summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-04 13:13:46 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-04 13:13:46 -0700
commit41c5b95ee14e9d6c92f5d9ed54a08f317b3a2080 (patch)
tree16a785ae7bf7cf984571f0ba939f4f4c9d0bba0f /CMakeLists.txt
parent09032a27619bb80471b056aa67219a208a06f2d1 (diff)
downloadsubsurface-41c5b95ee14e9d6c92f5d9ed54a08f317b3a2080.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files 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")