summaryrefslogtreecommitdiff
path: root/indra/llfilesystem
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-10 18:42:56 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-10 18:42:56 +0800
commita4543cf3cd41a466599de61f02e6d3b3d09700c4 (patch)
tree6743beff840669800d4bdc445919bd8f09a06cd5 /indra/llfilesystem
parent52d973e95567efcb145ed0de1f4b6f0e19663776 (diff)
parent0797257992ee7f88456d3083ebf214485b75c139 (diff)
Merge branch 'main' into DRTVWR-559
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r--indra/llfilesystem/CMakeLists.txt8
-rw-r--r--indra/llfilesystem/lldir_linux.cpp6
-rw-r--r--indra/llfilesystem/lldir_linux.h2
3 files changed, 11 insertions, 5 deletions
diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt
index 9f24f75eab..9a69a833c0 100644
--- a/indra/llfilesystem/CMakeLists.txt
+++ b/indra/llfilesystem/CMakeLists.txt
@@ -30,17 +30,17 @@ if (DARWIN)
LIST(APPEND llfilesystem_HEADER_FILES lldir_mac.h)
endif (DARWIN)
-if (LINUX)
+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_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\" -DAPP_LIBEXEC_DIR=\\\"${APP_LIBEXEC_DIR}\\\""
)
endif (INSTALL)
-endif (LINUX)
+endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
if (WINDOWS)
LIST(APPEND llfilesystem_SOURCE_FILES lldir_win32.cpp)
@@ -56,6 +56,8 @@ target_link_libraries(llfilesystem
)
target_include_directories( llfilesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+include(LibraryInstall)
+
# Add tests
if (LL_TESTS)
include(LLAddBuildTest)
diff --git a/indra/llfilesystem/lldir_linux.cpp b/indra/llfilesystem/lldir_linux.cpp
index 80ad05345a..7e8fe157ba 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;
@@ -205,7 +209,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name,
LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
}
- mCAFile = getExpandedFilename(LL_PATH_EXECUTABLE, "ca-bundle.crt");
+ mCAFile = add(mAppRODataDir, "ca-bundle.crt");
}
U32 LLDir_Linux::countFilesInDir(const std::string &dirname, const std::string &mask)
diff --git a/indra/llfilesystem/lldir_linux.h b/indra/llfilesystem/lldir_linux.h
index e83a020ba4..8c4d42f025 100644
--- a/indra/llfilesystem/lldir_linux.h
+++ b/indra/llfilesystem/lldir_linux.h
@@ -24,7 +24,7 @@
* $/LicenseInfo$
*/
-#if !LL_LINUX
+#if !LL_LINUX && !LL_FREEBSD
#error This header must not be included when compiling for any target other than Linux. Consider including lldir.h instead.
#endif // !LL_LINUX