summaryrefslogtreecommitdiff
path: root/indra/llfilesystem
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r--indra/llfilesystem/CMakeLists.txt8
-rw-r--r--indra/llfilesystem/lldir.cpp2
-rw-r--r--indra/llfilesystem/lldir_linux.cpp12
-rw-r--r--indra/llfilesystem/lldir_linux.h2
-rw-r--r--indra/llfilesystem/lldir_mac.cpp2
5 files changed, 18 insertions, 8 deletions
diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt
index 9f24f75eab..7db1971460 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}\\\" -DAPP_PLUGIN_DIR=\\\"${INSTALL_LIBRARY_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.cpp b/indra/llfilesystem/lldir.cpp
index 41fbb97175..dfb5f6dd2c 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -386,7 +386,7 @@ std::string LLDir::buildSLOSCacheDir() const
}
else
{
- res = add(getOSCacheDir(), "SecondLife");
+ res = add(getOSCacheDir(), "Megapahit");
}
return res;
}
diff --git a/indra/llfilesystem/lldir_linux.cpp b/indra/llfilesystem/lldir_linux.cpp
index 80ad05345a..784ddd5b71 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;
@@ -123,7 +127,7 @@ LLDir_Linux::LLDir_Linux()
if ((path_end = strrchr(tmp_str,'/')))
{
*path_end = '\0';
- mExecutableDir = tmp_str;
+ //mExecutableDir = tmp_str;
mWorkingDir = tmp_str;
mExecutableFilename = path_end+1;
}
@@ -133,7 +137,11 @@ LLDir_Linux::LLDir_Linux()
}
}
+#ifdef APP_PLUGIN_DIR
+ mLLPluginDir = APP_PLUGIN_DIR;
+#else
mLLPluginDir = mExecutableDir + mDirDelimiter + "llplugin";
+#endif
// *TODO: don't use /tmp, use $HOME/.secondlife/tmp or something.
mTempDir = "/tmp";
@@ -205,7 +213,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
diff --git a/indra/llfilesystem/lldir_mac.cpp b/indra/llfilesystem/lldir_mac.cpp
index 9ad8e274b6..5d72071fce 100644
--- a/indra/llfilesystem/lldir_mac.cpp
+++ b/indra/llfilesystem/lldir_mac.cpp
@@ -64,7 +64,7 @@ LLDir_Mac::LLDir_Mac()
{
mDirDelimiter = "/";
- const std::string secondLifeString = "SecondLife";
+ const std::string secondLifeString = "Megapahit";
std::string executablepathstr = getSystemExecutableFolder();