<div>Yes, I tried, but without success. </div><div><br></div>My resulting file is: <div><br></div><div><div>cmake_minimum_required(VERSION 2.8)</div><div><br></div><div>project(openvolt)</div><div><br></div><div>set(APP_NAME "OpenVolt")</div>
<div><br></div><div>include(FindSDL)</div><div>string(REPLACE "-framework Cocoa" "" SDL_LIBRARY ${SDL_LIBRARY})</div><div>include(FindOpenGL)</div><div>include(BundleUtilities)</div><div><br></div><div>
include_directories(${SDL_INCLUDE_DIR})</div><div><br></div><div>add_executable(${APP_NAME} MACOSX_BUNDLE main.cpp)</div><div><br></div><div>target_link_libraries(${APP_NAME} ${SDL_LIBRARY} SDLmain)</div><div><br></div><div>
if(APPLE)</div><div> install(DIRECTORY ${SDL_LIBRARY} DESTINATION ${APP_NAME}.app/Contents/Frameworks)</div><div>endif(APPLE)</div><div><br></div><div>However, it doesn't copies the framework. It just does nothing. </div>
<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;">
As Werner Smekal already mentioned (<a href="http://www.cmake.org/pipermail/cmake/2010-March/035636.html" target="_blank">http://www.cmake.org/pipermail/cmake/2010-March/035636.html</a>), for SDL it is apparently not necessary to use BundleUtilities. Have you tried this?<br>
<font color="#888888"><br>
Michael<br>
</font><div><div></div><div class="h5"><br>
<br>
On 5. Mar, 2010, at 12:50 , Francisco Requena wrote:<br>
<br>
> However, I can't get it working. My aim is to make an standalone .app<br>
> bundle, distributable with SDL embedded. How should I use BundleUtilities to<br>
> get rid of this?<br>
><br>
> Thanks.<br>
><br>
> 2010/3/5 Michael Wild <<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>><br>
><br>
>> <a href="http://www.cmake.org/Wiki/BundleUtilitiesExample" target="_blank">http://www.cmake.org/Wiki/BundleUtilitiesExample</a><br>
>><br>
>> Michael<br>
>><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><br>
>>> 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<br>
>> 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<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>
</div></div></blockquote></div><br></div>