Fix my stupid attempt to depend on the entire Data/Sys directory.

Instead, if SKIP_POSTPROCESS_BUNDLE is on, just use a symlink, and if
it's off, always run the install.
This commit is contained in:
comex 2013-09-23 00:22:00 -04:00
parent 0696fc93b2
commit 1bf2c03a99
1 changed files with 13 additions and 16 deletions

View File

@ -225,6 +225,8 @@ else()
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
) )
# get rid of any old copies
file (REMOVE_RECURSE ${BUNDLE_PATH}/Contents/Resources/Sys)
if(NOT SKIP_POSTPROCESS_BUNDLE) if(NOT SKIP_POSTPROCESS_BUNDLE)
# Fix up the bundle after it is finished. # Fix up the bundle after it is finished.
# There does not seem to be an easy way to run CMake commands post-build, # There does not seem to be an easy way to run CMake commands post-build,
@ -236,27 +238,22 @@ else()
message(\"To skip, pass -DSKIP_POSTPROCESS_BUNDLE=1 to cmake.)\") message(\"To skip, pass -DSKIP_POSTPROCESS_BUNDLE=1 to cmake.)\")
set(BU_CHMOD_BUNDLE_ITEMS ON) set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${BUNDLE_PATH}\" \"\" \"\") fixup_bundle(\"${BUNDLE_PATH}\" \"\" \"\")
file(INSTALL ${CMAKE_SOURCE_DIR}/Data/Sys
DESTINATION ${BUNDLE_PATH}/Contents/Resources
)
") ")
add_custom_command(TARGET ${DOLPHIN_EXE} POST_BUILD add_custom_command(TARGET ${DOLPHIN_EXE} POST_BUILD
COMMAND ${CMAKE_COMMAND} -P postprocess_bundle.cmake COMMAND ${CMAKE_COMMAND} -P postprocess_bundle.cmake
) )
endif() else()
add_custom_command(OUTPUT ${BUNDLE_PATH}/Contents/Resources/Sys
# Copy data files into application bundle. COMMAND ln -nfs ../../../../Data/Sys ${BUNDLE_PATH}/Contents/Resources/Sys
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/copy_data_into_bundle.cmake "
file(INSTALL ${CMAKE_SOURCE_DIR}/Data/Sys
DESTINATION ${BUNDLE_PATH}/Contents/Resources
)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/did_copy_data_into_bundle \"\")
")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/did_copy_data_into_bundle
COMMAND ${CMAKE_COMMAND} -P copy_data_into_bundle.cmake
DEPENDS ${CMAKE_SOURCE_DIR}/Data/Sys
VERBATIM VERBATIM
) )
add_custom_target(CopyDataIntoBundle ALL add_custom_target(CopyDataIntoBundle ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/did_copy_data_into_bundle DEPENDS ${BUNDLE_PATH}/Contents/Resources/Sys
) )
endif()
if(GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE AND wxWidgets_FOUND) if(GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE AND wxWidgets_FOUND)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/copy_translations_into_bundle.cmake " file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/copy_translations_into_bundle.cmake "