[CMake] copying dylibs into OSX bundle
Wesley Smith
wesley.hoke at gmail.com
Wed Nov 19 03:24:44 EST 2014
Hi,
I've been searching for how to copy some dylib dependencies for quite
a while and can't seem to find a definitive answer on the problem. I
have a .dylib file that needs to go into my app bundle (e.g.
MyApp.app/Frameworks). From what I've read, to use the FIXUP_BUNDLE
command, the file already has to be copied inside the bundle. How do
I do this? I tried:
set(ASSIMP_DYLIB "${ASSIMP_LINK_PATH}/${ASSIMP_LIB_NAME}.dylib")
set_source_files_properties(${ASSIMP_DYLIB} PROPERTIES
MACOSX_PACKAGE_LOCATION Frameworks)
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${AM_SOURCES} ${ASSIMP_DYLIB})
but got errors
CMake Error at CMakeLists.txt:205 (add_executable):
Cannot find source file:
../support/libs/assimp/lib/osx/assimp.dylib
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
What's the proper way to copy here?
thanks,
wes
More information about the CMake
mailing list