diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-07-30 19:02:54 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-07-30 19:02:54 +0800 |
commit | e08ad14176502a8cc26b401c48b7161ce8c39140 (patch) | |
tree | 299e13da764a500e297c44bcd620564cd85fb505 | |
parent | 9aac948d59cee9bce12098b060d94aeba33efa86 (diff) |
SLPlugin is in libexec when installed to system
-rw-r--r-- | indra/cmake/UnixInstall.cmake | 4 | ||||
-rw-r--r-- | indra/llfilesystem/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/llfilesystem/lldir_linux.cpp | 4 | ||||
-rw-r--r-- | indra/llplugin/slplugin/CMakeLists.txt | 4 |
4 files changed, 13 insertions, 1 deletions
diff --git a/indra/cmake/UnixInstall.cmake b/indra/cmake/UnixInstall.cmake index ecec0e3417..55b6889836 100644 --- a/indra/cmake/UnixInstall.cmake +++ b/indra/cmake/UnixInstall.cmake @@ -28,4 +28,8 @@ if (INSTALL) set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/${VIEWER_BINARY_NAME} CACHE PATH "Installation directory for read-only data files.") + + set(APP_LIBEXEC_DIR ${INSTALL_PREFIX}/libexec/${VIEWER_BINARY_NAME} + CACHE PATH + "Installation directory for non-manual executables.") endif (INSTALL) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 6e9cec9085..9a69a833c0 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -37,7 +37,7 @@ if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") if (INSTALL) set_source_files_properties(lldir_linux.cpp PROPERTIES COMPILE_FLAGS - "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\"" + "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\" -DAPP_LIBEXEC_DIR=\\\"${APP_LIBEXEC_DIR}\\\"" ) endif (INSTALL) endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") diff --git a/indra/llfilesystem/lldir_linux.cpp b/indra/llfilesystem/lldir_linux.cpp index 80ad05345a..300cab39d6 100644 --- a/indra/llfilesystem/lldir_linux.cpp +++ b/indra/llfilesystem/lldir_linux.cpp @@ -83,7 +83,11 @@ LLDir_Linux::LLDir_Linux() mExecutableFilename = ""; mExecutablePathAndName = ""; +#ifdef APP_LIBEXEC_DIR + mExecutableDir = APP_LIBEXEC_DIR; +#else mExecutableDir = tmp_str; +#endif mWorkingDir = tmp_str; #ifdef APP_RO_DATA_DIR mAppRODataDir = APP_RO_DATA_DIR; diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index f1a75ff97f..871d858b58 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -65,6 +65,10 @@ if (BUILD_SHARED_LIBS) "${LINK_FLAGS_RELEASE} -Wl,--allow-shlib-undefined") endif () +if (INSTALL) + install(TARGETS ${PROJECT_NAME} DESTINATION ${APP_LIBEXEC_DIR}) +endif () + if (LL_TESTS) ll_deploy_sharedlibs_command(SLPlugin) endif (LL_TESTS) |