<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div><br></div><div>Thanks, will try that out, however, what I was trying was something like the following:</div><div><div><br></div><div>add_executable(openorbit MACOSX_BUNDLE ${openorbit_SRC})</div><div>set_target_properties(openorbit PROPERTIES RESOURCE ${res_list})</div></div><div><div><br></div><div>I assume then that setting the resource property on a target only works on frameworks (and not applications), this is a bit inconsistent I think.</div></div><div><br></div><div><br></div><div>Regards,</div><div>Mattias</div><br><div><html>On 7 Apr 2008, at 18:55, David Cole wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite">This is a snippet from the CMake source tree, in the file CMake/Tests/BundleTest/CMakeLists.txt :<br><br><snippet><br>SET_SOURCE_FILES_PROPERTIES(<br> "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"<br> PROPERTIES<br> MACOSX_PACKAGE_LOCATION Resources<br> )<br><br>SET_SOURCE_FILES_PROPERTIES(<br> SomeRandomFile.txt<br> "${CMake_SOURCE_DIR}/ChangeLog.txt"<br> PROPERTIES<br> MACOSX_PACKAGE_LOCATION MacOS<br> )<br><br>SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")<br><br># Test building a bundle linking to a shared library.<br>ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)<br>ADD_EXECUTABLE(BundleTest<br> MACOSX_BUNDLE<br> BundleTest.cxx<br> SomeRandomFile.txt<br> "${CMake_SOURCE_DIR}/ChangeLog.txt"<br> "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"<br> )<br></snippet><br> <br><br>It should be as simple as adding the resource files as sources to your executable that has the MACOSX_BUNDLE flag on and then:<br><br>SET_SOURCE_FILES_PROPERTIES(<br> "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"<br> PROPERTIES<br> MACOSX_PACKAGE_LOCATION Resources<br> )<br> <br>When you have the MACOSX_PACKAGE_LOCATION set and the file is added as a source, it should be copied into the .app bundle during a "make" (or a build with Xcode).<br><br><br>HTH,<br>David<br><br><br><div class="gmail_quote"> On Mon, Apr 7, 2008 at 12:16 PM, Mattias Holm <<a href="mailto:mattias.holm@contra.nu">mattias.holm@contra.nu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi,<br><br>I asked about this before, but i think it was lost in all the other talk of cmake 2.6 at that moment.<br><br>How do I ensure that resources added to the resource list of an application is installed in the MacOS X application bundle?<br> <br>Will it be done during the normal build (i.e. without typing make install), and will it in that case avoid copying files if they have not changed (some resource files can be quite heavy).<br><br>I tried adding the resource files to the the application, but they were not installed in the app bundle on a plain "make".<br> <br>Do I need to do something with the install command as well?<br><font color="#888888"><br><br>/ Mattias<br><br> </font><br>_______________________________________________<br> CMake mailing list<br> <a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></blockquote></div><br></body></html>