summaryrefslogtreecommitdiff
path: root/indra/newview/CMakeLists.txt
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-07-10 21:50:00 +0800
committerErik Kundiman <erik@megapahit.org>2024-07-10 21:50:00 +0800
commit4390609584487896c58e3a9e79d2a56116336322 (patch)
tree19dc659d4e3fb53d57fbca0a6446ae051b157d76 /indra/newview/CMakeLists.txt
parent05c26d2e074f8210f205a674d7fb374e5f96e176 (diff)
`cpack -G Bundle` instead of `make install` on Mac
Root project finally renamed to Megapahit, which has a nice effect of CPack: - Run preinstall target for: Megapahit CPack: - Install project: Megapahit [] but it's really because CPack Bundle file couldn't be renamed via CPACK_PACKAGE_NAME like on DEB, RPM, and FREEBSD. CPack determines its own destination root folder, which is Resources (I didn't find a way to set it to Contents). fixup_bundle is now run on the .app deep inside CPack staging folders so that the dependency copies will be included in the DMG.
Diffstat (limited to 'indra/newview/CMakeLists.txt')
-rw-r--r--indra/newview/CMakeLists.txt29
1 files changed, 26 insertions, 3 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index f86e2cb2fb..3076724a05 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -2133,7 +2133,7 @@ if (DARWIN)
set(product "${VIEWER_CHANNEL}")
set(MACOSX_EXECUTABLE_NAME "${VIEWER_CHANNEL}")
set(MACOSX_BUNDLE_INFO_STRING "${VIEWER_CHANNEL}")
- set(MACOSX_BUNDLE_ICON_FILE "secondlife.icns")
+ set(MACOSX_BUNDLE_ICON_FILE "${VIEWER_CHANNEL}.icns")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "net.megapahit.viewer")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
set(MACOSX_BUNDLE_BUNDLE_NAME "Megapahit")
@@ -2169,7 +2169,9 @@ if (DARWIN)
"${VIEWER_APP_BUNDLE}/Contents/Info.plist"
)
- if (NOT INSTALL)
+ if (INSTALL)
+ install(PROGRAMS ${VIEWER_APP_EXE} DESTINATION ../MacOS)
+ else (INSTALL)
add_custom_command(
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
COMMAND ${PYTHON_EXECUTABLE}
@@ -2194,7 +2196,7 @@ if (DARWIN)
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
- endif (NOT INSTALL)
+ endif (INSTALL)
if (ENABLE_MEDIA_PLUGINS)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
@@ -2209,6 +2211,26 @@ if (DARWIN)
endif (ENABLE_SIGNING)
if (PACKAGE)
+ if (USESYSTEMLIBS)
+ set(CPACK_DMG_VOLUME_NAME "${product} Installer"
+ CACHE STRING "Disk image volume name.")
+ set(CPACK_DMG_FORMAT UDRW CACHE STRING "Disk image format.")
+ set(CPACK_DMG_DS_STORE
+ ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/release-dmg/_DS_Store
+ CACHE STRING "Disk image .DS_Store file.")
+ set(CPACK_DMG_DS_STORE_SETUP_SCRIPT
+ ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/dmg-cleanup.applescript
+ CACHE STRING "Disk image AppleScript file.")
+ set(CPACK_DMG_BACKGROUND_IMAGE
+ ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/release-dmg/background.jpg
+ CACHE STRING "Disk image background image.")
+ set(CPACK_BUNDLE_NAME ${product} CACHE STRING "Bundle name.")
+ set(CPACK_BUNDLE_PLIST ${VIEWER_APP_BUNDLE}/Contents/Info.plist
+ CACHE STRING "Bundle Property List file.")
+ set(CPACK_BUNDLE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/secondlife.icns
+ CACHE STRING "Bundle icon file.")
+
+ else (USESYSTEMLIBS)
add_custom_target(llpackage ALL DEPENDS ${VIEWER_BINARY_NAME})
add_custom_command(
@@ -2234,6 +2256,7 @@ if (DARWIN)
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
+ endif (USESYSTEMLIBS)
endif (PACKAGE)
endif (DARWIN)