<div dir="ltr">I have the following rough CMakeLists.txt:<div><br></div><div style>add_library(foo.version1 ...)</div><div style><br></div><div style>...</div><div style><br></div><div style><br></div><div style>add_library(foo ...)</div>
<div style><br></div><div style>...</div><div style><br></div><div style><br></div><div style>Both of the these libraries are set to create a framework called foo.framework. Both add_library() calls are in the same directory which necessitates a different name for foo.version1.</div>
<div style><br></div><div style>In the first case, CMake creates foo.version1.framework. This version1 framework contains an older version of my framework library.</div><div style><br></div><div style>The foo.framework version creates a newer version of my framework library. Using some POST_BUILD custom commands I extract the contents of foo.version1.framework and embed the contents into foo.framework so that my foo.framework contains both the version1 and the new version of my framework. The custom command also renames foo.version1 references from the foo.version1 build to just plain 'foo'. All this works quite well.</div>
<div style><br></div><div style>I now have a need to install both of my frameworks and they both need to have the name foo.framework.</div><div style><br></div><div style>My install commands look as follows:</div><div style>
<br></div><div style>install(TARGETS foo.version1 FRAMEWORK DESTINATION directory/subdirectory)</div><div style><br></div><div style>install(TARGETS foo FRAMEWORK DESTINATION directory)</div><div style><br></div><div style>
These commands install the frameworks correctly except that foo.version1 has the name foo.version1.framework instead of foo.framework.</div><div style><br></div><div style>I need help setting up this build so that I can get the foo.version1 build of the framework in directory/subdirectory but with the name foo.framework while at the same time getting foo.framework (the newer version) installed as foo.framework in the 'directory' folder. </div>
<div style><br></div><div style>Thanks in advance for help,</div><div style><br></div><div style>Steve </div></div>