[CMake] OS X, embedding Frameworks and generator problems
Michael Wild
themiwi at gmail.com
Fri Mar 5 03:47:55 EST 2010
http://www.cmake.org/Wiki/BundleUtilitiesExample
Michael
On 5. Mar, 2010, at 9:40 , Francisco Requena wrote:
> So how do I embeed a framework on an OS X bundle?
> Jjgod Jiang has the same problem here:
> http://www.cmake.org/pipermail/cmake/2009-September/031713.html
>
> 2010/3/5 David Cole <david.cole at kitware.com>
>
>> SDL_library is not a source file, so don't call:
>> set_source_files_properties
>> on it...
>>
>> That should eliminate the spurious content copy attempt...
>>
>>
>> On Thu, Mar 4, 2010 at 6:17 PM, Francisco Requena <the.adx at gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I'm trying to develop a simple application using SDL on OS X. Here's my
>>> CMakeLists.txt:
>>>
>>> cmake_minimum_required(VERSION 2.8)
>>>
>>> project(newapp)
>>>
>>> include(FindSDL)
>>> include(FindOpenGL)
>>>
>>> include_directories(${SDL_INCLUDE_DIR})
>>>
>>> string(REPLACE "-framework Cocoa" "" SDL_LIBRARY ${SDL_LIBRARY})
>>>
>>> set_source_files_properties(${SDL_LIBRARY} PROPERTIES
>>> MACOSX_PACKAGE_LOCATION Frameworks)
>>>
>>> add_executable(myapp MACOSX_BUNDLE main.cpp ${SDL_LIBRARY})
>>>
>>> target_link_libraries(myapp ${SDL_LIBRARY} SDLmain "-framework Cocoa")
>>>
>>> Then I do:
>>> cmake
>>> make
>>>
>>> And that's what I get:
>>> Error copying file "/Library/Frameworks/SDL.framework" to
>>> "myapp.app/Contents/Frameworks/SDL.framework".
>>> make[2]: *** [myapp.app/Contents/Frameworks/SDL.framework] Error 1
>>> make[1]: *** [CMakeFiles/myapp.dir/all] Error 2
>>> make: *** [all] Error 2
>>>
>>> However, if I do:
>>> cmake -G Xcode
>>>
>>> And then I open the generated Xcode project and do compile, all is working
>>> properly.
>>> What should I do?
>>> It's just a bug?
>>>
>>> Thanks,
>>> Franciso Requena.
>>>
>>>
>>> I use the lastest CMake version (git cloned). It's 2.9.20100304.
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>
>>
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list