small tweak for bundle creation
authorkoda
Sun, 03 Apr 2011 16:46:20 +0200
changeset 5096 7d588baaff82
parent 5095 15dd764b728c
child 5097 53e9d9451328
small tweak for bundle creation
tools/CMakeLists.txt
tools/CreateMacBundle.cmake.in
--- a/tools/CMakeLists.txt	Sun Apr 03 16:34:12 2011 +0200
+++ b/tools/CMakeLists.txt	Sun Apr 03 16:46:20 2011 +0200
@@ -28,6 +28,7 @@
 	string(REGEX REPLACE "(.*)/include.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}")
 	find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac PATHS ${qt_base_dir}/bin NO_DEFAULT_PATH)
 
+	#this tool is present in qt 4.5 but only if you compile from sources; from qt 4.6 is present also in the binary version
 	if(NOT macdeployqt_EXE)
 		message(FATAL_ERROR "The utility macdeployqt is required to create the bundle!")
 	endif()
--- a/tools/CreateMacBundle.cmake.in	Sun Apr 03 16:34:12 2011 +0200
+++ b/tools/CreateMacBundle.cmake.in	Sun Apr 03 16:46:20 2011 +0200
@@ -2,11 +2,10 @@
 
 execute_process(COMMAND ls ${frameworks_dir} RESULT_VARIABLE doBundle OUTPUT_QUIET ERROR_QUIET)
 
-if(doBundle EQUAL 1)
-    execute_process(COMMAND mkdir -p ${frameworks_dir})
+execute_process(COMMAND mkdir -p ${frameworks_dir})
+execute_process(COMMAND ${macdeployqt_EXE} ${CMAKE_BINARY_DIR}/${bundle_name} OUTPUT_QUIET ERROR_QUIET)
 
-    execute_process(COMMAND ${macdeployqt_EXE} ${CMAKE_BINARY_DIR}/${bundle_name} OUTPUT_QUIET ERROR_QUIET)
-
+if(doBundle EQUAL 1)
     execute_process(COMMAND cp -pPR ${sdl_dir}          ${CMAKE_BINARY_DIR}/${frameworks_dir}/SDL.framework)
     execute_process(COMMAND cp -pPR ${SDLIMAGE_LIBRARY} ${CMAKE_BINARY_DIR}/${frameworks_dir}/SDL_image.framework)
     execute_process(COMMAND cp -pPR ${SDLNET_LIBRARY}   ${CMAKE_BINARY_DIR}/${frameworks_dir}/SDL_net.framework)