[CMake] Embedding Private Frameworks in Mac OSX Bundles

Wilhansen Li willi.t1 at gmail.com
Wed Feb 4 10:57:06 EST 2009


Hi there!
I'm getting started with CMake and I'm using it to generate XCode files for
the Mac. One thing I had trouble with is embedding private frameworks in the
bundle such that it lives in the Contents/Frameworks subdirectory. I tried
doing something like this:

if (APPLE)
set(ADDITIONAL_INCLUDES ${FRAMEWORKS})
set_source_files_properties(${FRAMEWORKS} PROPERTIES MACOSX_PACKAGE_LOCATION
Frameworks)
endif()

add_executable(TargetName MACOSX_BUNDLE ${SOURCES} ${FRAMEWORKS})

and well... it DOES put the frameworks in the Frameworks subdir (and it
works!), but the resulting XCode project file looks unelegant: No
"Frameworks" group and the linked frameworks are displayed as sources
without the nice toolbox icon.

So the question is: is there a better way to do this?

-- 
Life is too short for dial-up.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090204/1a8d5122/attachment.htm>


More information about the CMake mailing list