However, I can't get it working. My aim is to make an standalone .app bundle, distributable with SDL embedded. How should I use BundleUtilities to get rid of this?<div><br></div><div>Thanks. <br><br><div class="gmail_quote">
2010/3/5 Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><a href="http://www.cmake.org/Wiki/BundleUtilitiesExample" target="_blank">http://www.cmake.org/Wiki/BundleUtilitiesExample</a><br>
<font color="#888888"><br>
Michael<br>
</font><div><div></div><div class="h5"><br>
On 5. Mar, 2010, at 9:40 , Francisco Requena wrote:<br>
<br>
> So how do I embeed a framework on an OS X bundle?<br>
> Jjgod Jiang has the same problem here:<br>
> <a href="http://www.cmake.org/pipermail/cmake/2009-September/031713.html" target="_blank">http://www.cmake.org/pipermail/cmake/2009-September/031713.html</a><br>
><br>
> 2010/3/5 David Cole <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>><br>
><br>
>> SDL_library is not a source file, so don't call:<br>
>> set_source_files_properties<br>
>> on it...<br>
>><br>
>> That should eliminate the spurious content copy attempt...<br>
>><br>
>><br>
>> On Thu, Mar 4, 2010 at 6:17 PM, Francisco Requena <<a href="mailto:the.adx@gmail.com">the.adx@gmail.com</a>>wrote:<br>
>><br>
>>> Hi,<br>
>>><br>
>>> I'm trying to develop a simple application using SDL on OS X. Here's my<br>
>>> 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<br>
>>> 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<br>
>>> "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<br>
>>> 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.<br>
>>> _______________________________________________<br>
>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>><br>
>>> Visit other Kitware open-source projects at<br>
>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>><br>
>>> Please keep messages on-topic and check the CMake FAQ at:<br>
>>> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
>>><br>
>>> Follow this link to subscribe/unsubscribe:<br>
>>> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
>>><br>
>><br>
>><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
</div></div></blockquote></div><br></div>