Short: Is linking to Mac OS X frameworks with Xcode generator totally
broken, or am I just doing something wrong?

Long: I use CMake as the build system for my project[1], and I use
this [2] module to find SDL2 in the user's system. find_library() opts
for the SDL2.framework on Mac OS X, which is located (in my system) in
"/Library/Frameworks/SDL2.framework". In the cache, I can see the
following entries:

SDL2_INCLUDE_DIR: /Library/Frameworks/SDL2.framework/Headers
SDL2_LIBRARY       : /Library/Frameworks/SDL2.framework;-framework Cocoa

I can successfully generate the Xcode project, but during the build
process, I get an error that 'SDL2: framework not found'. I have
currently found two workarounds:

1). Change SDL2_LIBRARY to point to the actual SDL2 library and not
the framework:

SDL2_LIBRARY        : /Library/Frameworks/SDL2.framework/SDL2;-framework Cocoa

2). Use the makefile generator. The error only occurs with Xcode.

So what is wrong? I can't really test much more on a Mac OS X system
(because I use a friend's Macbook for testing and he's away). This is
CMake 2.8.12, downloaded from the CMake download page.

Thanks in advance,
Aggelos Kolaitis

[1]: http://bitbucket.org/sdlu/sdlu
[2]: 
https://bitbucket.org/sdlu/sdlu/src/c957300ede2fa1b9c4f1095359655fac806600b8/scripts/cmake/FindSDL2.cmake?at=master
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to