<span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Hi, <br><br>I'm trying to develop a simple application using SDL on OS X. Here's my CMakeLists.txt: <br><br>cmake_minimum_required(VERSION 2.8)<br>
<br>project(newapp)<br><br>include(FindSDL)<br>include(FindOpenGL)<br><br>include_directories(${SDL_INCLUDE_DIR})<br><br>string(REPLACE "-framework Cocoa" "" SDL_LIBRARY ${SDL_LIBRARY})<br><br>set_source_files_properties(${SDL_LIBRARY} PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks)<br>
<br>add_executable(myapp MACOSX_BUNDLE main.cpp ${SDL_LIBRARY})<br><br>target_link_libraries(myapp ${SDL_LIBRARY} SDLmain "-framework Cocoa")<br><br>Then I do: <br>cmake<br>make<br><br>And that's what I get: <br>
Error copying file "/Library/Frameworks/SDL.framework" to "myapp.app/Contents/Frameworks/SDL.framework".<br>make[2]: *** [myapp.app/Contents/Frameworks/SDL.framework] Error 1<br>make[1]: *** [CMakeFiles/myapp.dir/all] Error 2<br>
make: *** [all] Error 2<br><br>However, if I do: <br>cmake -G Xcode<br><br>And then I open the generated Xcode project and do compile, all is working properly. <br>What should I do?<br>It's just a bug?<br><br>Thanks,<br>
Franciso Requena. <br><br><br>I use the lastest CMake version (git cloned). It's 2.9.20100304.</span>