diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-08-26 15:46:12 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-08-26 15:46:12 +0800 |
commit | 00be9e00107c51a35c04f64fe917c559b8325564 (patch) | |
tree | e7aebc8ad6e398da3a5e475a1983368749eeafb0 | |
parent | a09352872b2f1a9db452d9cc313088abd5fb75c0 (diff) |
CPack for packaging (when PACKAGE set to on)
Since we could use the dynamic versioning from the configuration phase
of CMake, the inclusion is put in BuildVersion.cmake.
Other CPACK variables are usually static so can be set when running
cmake.
CPack somehow doesn't pick up the DESTINATION values in ViewerInstall
(slplugin & libvlc too) from UnixInstall, so they're they're partially
hardcoded again there.
-rw-r--r-- | indra/cmake/BuildVersion.cmake | 6 | ||||
-rw-r--r-- | indra/llplugin/slplugin/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/media_plugins/libvlc/CMakeLists.txt | 3 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 4 | ||||
-rw-r--r-- | indra/newview/ViewerInstall.cmake | 12 |
5 files changed, 19 insertions, 8 deletions
diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index b531f29ee2..a56829bf14 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -55,4 +55,10 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n "LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}" "LLBUILD_CONFIG=\"${CMAKE_BUILD_TYPE}\"" ) +if (PACKAGE) + include(CPack) + set(CPACK_PACKAGE_VERSION + ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} + CACHE STRING "Viewer major.minor.patch.revision versions.") +endif (PACKAGE) endif (NOT DEFINED VIEWER_SHORT_VERSION) diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 871d858b58..e86ddd8a32 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -66,7 +66,7 @@ if (BUILD_SHARED_LIBS) endif () if (INSTALL) - install(TARGETS ${PROJECT_NAME} DESTINATION ${APP_LIBEXEC_DIR}) + install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME}) endif () if (LL_TESTS) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index cdaf3efbfa..84fac1634c 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -57,5 +57,6 @@ if (DARWIN) endif (DARWIN) if (INSTALL) - install(TARGETS ${PROJECT_NAME} DESTINATION ${APP_LIBEXEC_DIR}/llplugin) + install(TARGETS ${PROJECT_NAME} DESTINATION + libexec/${VIEWER_BINARY_NAME}/llplugin) endif () diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 226f9a3bda..b5c88cfca1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1955,6 +1955,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") -Wno-stringop-truncation) endif () +if (NOT USESYSTEMLIBS) + if (LINUX) set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}) @@ -2141,6 +2143,8 @@ if (DARWIN) endif (PACKAGE) endif (DARWIN) +endif (NOT USESYSTEMLIBS) + if (INSTALL) include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake) endif (INSTALL) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index e321d7e563..af5876f411 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -1,9 +1,9 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME} - DESTINATION ${APP_BINARY_DIR} + DESTINATION bin ) install(DIRECTORY skins app_settings linux_tools - DESTINATION ${APP_SHARE_DIR} + DESTINATION share/${VIEWER_BINARY_NAME} PATTERN ".svn" EXCLUDE ) @@ -12,7 +12,7 @@ find_file(IS_ARTWORK_PRESENT NAMES have_artwork_bundle.marker if (IS_ARTWORK_PRESENT) install(DIRECTORY res res-sdl character - DESTINATION ${APP_SHARE_DIR} + DESTINATION share/${VIEWER_BINARY_NAME} PATTERN ".svn" EXCLUDE ) else (IS_ARTWORK_PRESENT) @@ -20,10 +20,10 @@ else (IS_ARTWORK_PRESENT) endif (IS_ARTWORK_PRESENT) install(FILES featuretable_linux.txt - #featuretable_solaris.txt - DESTINATION ${APP_SHARE_DIR} + #featuretable_solaris.txt + DESTINATION share/${VIEWER_BINARY_NAME} ) install(FILES ${SCRIPTS_DIR}/messages/message_template.msg - DESTINATION ${APP_SHARE_DIR}/app_settings + DESTINATION share/${VIEWER_BINARY_NAME}/app_settings ) |