[CMake] Copy frameworks in Mac OS X app bundle

Jjgod Jiang gzjjgod at gmail.com
Tue Sep 1 06:08:24 EDT 2009


Hi,

I'm trying to build a Mac OS X app bundle with private frameworks
embedded. Basically what I am using is like this:

find_library(SPARKLE_FRAMEWORK Sparkle ${ADD_FRAMEWORK_PATH})

set_source_files_properties(${SPARKLE_FRAMEWORK} PROPERTIES
    MACOSX_PACKAGE_LOCATION Frameworks)

add_executable(${PROGNAME} MACOSX_BUNDLE ${SOURCES} ${SPARKLE_FRAMEWORK})

However, when I build, it failed with the following error:

Copying OS X content Vim.app/Contents/Frameworks/Sparkle.framework
Error copying file
"/Users/jjgod/Codes/c/vim/src/mac/Sparkle.framework" to
"Vim.app/Contents/Frameworks/Sparkle.framework".
make[2]: *** [Vim.app/Contents/Frameworks/Sparkle.framework] Error 1
make[1]: *** [CMakeFiles/Vim.dir/all] Error 2
make: *** [all] Error 2

And it produces a 0 byte file at target place.

I saw Wilhansen Li's email: http://marc.info/?l=cmake&m=123376303417779&w=2
here, he seemed to handle it fine, but I can't tell any difference between
his configuration and mine, is there anything I missed?

- Jiang


More information about the CMake mailing list