# HG changeset patch # User koda # Date 1373336628 -7200 # Node ID bb9bf1efd0d2637ce3c8f4e72fd3c42129f49a43 # Parent 67552b2e20ca11c2821fe0d217037ed1ba71512e use the modern install(SCRIPT ...) command instead of legacy POST_BUILD_SCRIPT diff -r 67552b2e20ca -r bb9bf1efd0d2 tools/CMakeLists.txt --- a/tools/CMakeLists.txt Tue Jul 09 04:16:21 2013 +0200 +++ b/tools/CMakeLists.txt Tue Jul 09 04:23:48 2013 +0200 @@ -50,10 +50,10 @@ message(FATAL_ERROR "The utility macdeployqt is required to create the bundle (seached: ${qt_base_dir})") endif() - #dummy target, we're interested in the postscript file - add_custom_target(bundle) - set_target_properties(bundle PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake) + #create the .app bundle + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake) + install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake + CODE "message(STATUS \"Your app bundle is ready\")") - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake) endif() diff -r 67552b2e20ca -r bb9bf1efd0d2 tools/CreateMacBundle.cmake.in --- a/tools/CreateMacBundle.cmake.in Tue Jul 09 04:16:21 2013 +0200 +++ b/tools/CreateMacBundle.cmake.in Tue Jul 09 04:23:48 2013 +0200 @@ -1,6 +1,5 @@ -message(STATUS "Performing standalone bundle creation...") -execute_process(COMMAND stat ${frameworks_dir} RESULT_VARIABLE doBundle OUTPUT_QUIET ERROR_QUIET) +execute_process(COMMAND stat ${frameworks_dir}/SDL.framework RESULT_VARIABLE doBundle OUTPUT_QUIET ERROR_QUIET) execute_process(COMMAND mkdir -p ${frameworks_dir}) # macdeployqt will convert safely any absolute path library for 'hedgewars' execute_process(COMMAND ${macdeployqt_executable} ${CMAKE_BINARY_DIR}/Hedgewars.app OUTPUT_QUIET ERROR_QUIET) @@ -31,7 +30,7 @@ if(${SPARKLE_FOUND}) execute_process(COMMAND cp -pPR ${SPARKLE_LIBRARY} ${frameworks_dir}/Sparkle.framework) endif() - message(STATUS "Bundle frameworks added") + message(STATUS "Frameworks and libraries successfully copied...") else() - message(STATUS "Bundle frameworks already present; skipping...") + message(STATUS "Frameworks already present, skipping...") endif()