[CMake] Reconfiguring a framework at install time.

Steven Wilson steven.wesley.wilson at gmail.com
Fri Dec 28 13:35:12 EST 2012


I have the following rough CMakeLists.txt:

add_library(foo.version1 ...)

...


add_library(foo ...)

...


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.

In the first case, CMake creates foo.version1.framework.   This version1
framework contains an older version of my framework library.

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.

I now have a need to install both of my frameworks and they both need to
have the name foo.framework.

My install commands look as follows:

install(TARGETS foo.version1 FRAMEWORK DESTINATION directory/subdirectory)

install(TARGETS foo FRAMEWORK DESTINATION directory)

These commands install the frameworks correctly except that foo.version1
has the name foo.version1.framework instead of foo.framework.

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.

Thanks in advance for help,

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121228/320c6484/attachment.htm>


More information about the CMake mailing list