From 72c5668d54dd7f0fd43ce084cee84ea07662c4ae Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 10 Aug 2024 21:00:29 +0800 Subject: Make sure APP_SHARE_DIR is valued in llfilesystem otherwise the app would crash on GNU/Linux or BSD for missing the share directory prefix, unless cmake is run twice like before just so APP_SHARE_DIR is picked up but we don't want to have to run it twice. --- indra/llfilesystem/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llfilesystem') diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 7db1971460..22c30c55d9 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -4,6 +4,7 @@ project(llfilesystem) include(00-Common) include(LLCommon) +include(UnixInstall) set(llfilesystem_SOURCE_FILES lldir.cpp -- cgit v1.2.3 From 1685e1590f7cb6e03d697f7abd1570f51dd37778 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 11 Aug 2024 15:49:22 +0800 Subject: Minimise UnixInstall.cmake difference from SLv's The variables set in this file are used only in llfilesystem/CMakeLists.txt, and only used within a Linux (& FreeBSD) section, which then later used in llfilesystem/lldir_linux.cpp, so Darwin doesn't need these variables set specifically for it. --- indra/llfilesystem/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/llfilesystem') diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 22c30c55d9..8d85f739b3 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -4,7 +4,9 @@ project(llfilesystem) include(00-Common) include(LLCommon) -include(UnixInstall) +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) + include(UnixInstall) +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) set(llfilesystem_SOURCE_FILES lldir.cpp @@ -31,17 +33,17 @@ if (DARWIN) LIST(APPEND llfilesystem_HEADER_FILES lldir_mac.h) endif (DARWIN) -if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) LIST(APPEND llfilesystem_SOURCE_FILES lldir_linux.cpp) LIST(APPEND llfilesystem_HEADER_FILES lldir_linux.h) if (INSTALL) set_source_files_properties(lldir_linux.cpp PROPERTIES COMPILE_FLAGS - "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\" -DAPP_LIBEXEC_DIR=\\\"${APP_LIBEXEC_DIR}\\\" -DAPP_PLUGIN_DIR=\\\"${INSTALL_LIBRARY_DIR}\\\"" + "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\" -DAPP_LIBEXEC_DIR=\\\"${APP_LIBEXEC_DIR}\\\" -DAPP_PLUGIN_DIR=\\\"${INSTALL_LIBRARY_DIR}\\\"" ) endif (INSTALL) -endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) if (WINDOWS) LIST(APPEND llfilesystem_SOURCE_FILES lldir_win32.cpp) @@ -56,7 +58,6 @@ target_link_libraries(llfilesystem llcommon ) target_include_directories( llfilesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) - include(LibraryInstall) # Add tests -- cgit v1.2.3