From 41c5b95ee14e9d6c92f5d9ed54a08f317b3a2080 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 4 Apr 2015 13:13:46 -0700 Subject: cmake: Mac install into Subsurface.app I guess I should add the code to move that app to /Applications but I never use it this way... not sure how many people really install from source on a Mac, anyway. Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6129a99a4..fc3fce49f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -450,10 +450,18 @@ endforeach() # now for each platform the install instructions if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") -# # OS X bundling rules -# # "make mac-deploy" deploys the external libs (Qt, libdivecomputer, libusb, etc.) into the bundle -# # "make install" installs the bundle to /Applications -# # "make mac-create-dmg" creates Subsurface.dmg + # right now make install creates a self contained .app file in Subsurface.app + set(RESOURCEDIR ${CMAKE_BINARY_DIR}/Subsurface.app/Contents/Resources) + install(DIRECTORY marbledata/maps DESTINATION ${RESOURCEDIR}/data) + install(DIRECTORY marbledata/bitmaps DESTINATION ${RESOURCEDIR}/data) + install(DIRECTORY Documentation/images DESTINATION ${RESOURCEDIR}/share/Documentation) + install(FILES ${DOCFILES} DESTINATION ${RESOURCEDIR}/share/Documentation) + install(DIRECTORY theme DESTINATION ${RESOURCEDIR}) + install(FILES ${TRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations) + install(FILES ${QTTRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations) + install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt DESTINATION ${RESOURCEDIR}) + install(TARGETS subsurface DESTINATION ${RESOURCEDIR}/../MacOS) + install(CODE "execute_process(COMMAND mac-deploy Subsurface.app)") ENDIF() if(CMAKE_SYSTEM_NAME STREQUAL "Windows") -- cgit v1.2.3-70-g09d2