diff options
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r-- | indra/llfilesystem/CMakeLists.txt | 10 | ||||
-rw-r--r-- | indra/llfilesystem/lldir.cpp | 4 | ||||
-rw-r--r-- | indra/llfilesystem/lldir_linux.cpp | 12 | ||||
-rw-r--r-- | indra/llfilesystem/lldir_linux.h | 2 | ||||
-rw-r--r-- | indra/llfilesystem/lldir_mac.cpp | 2 |
5 files changed, 21 insertions, 9 deletions
diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 9f24f75eab..8d85f739b3 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -4,6 +4,9 @@ project(llfilesystem) include(00-Common) include(LLCommon) +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) + include(UnixInstall) +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) set(llfilesystem_SOURCE_FILES lldir.cpp @@ -30,17 +33,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) @@ -55,6 +58,7 @@ target_link_libraries(llfilesystem llcommon ) target_include_directories( llfilesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) # Add tests if (LL_TESTS) diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp index a18dc0a4f1..7b03143053 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; } @@ -690,7 +690,7 @@ void LLDir::walkSearchSkinDirs(const std::string& subdir, const std::string& filename, const FUNCTION& function) const { - for (const std::string& skindir : mSearchSkinDirs) + for (std::string skindir : mSearchSkinDirs) { std::string subdir_path(add(skindir, subdir)); for (const std::string& subsubdir : subsubdirs) diff --git a/indra/llfilesystem/lldir_linux.cpp b/indra/llfilesystem/lldir_linux.cpp index b13b42c954..69cfedebc7 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 bd031bd7bb..f9b0427ccd 100644 --- a/indra/llfilesystem/lldir_linux.h +++ b/indra/llfilesystem/lldir_linux.h @@ -24,7 +24,7 @@ * $/LicenseInfo$ */ -#if !LL_LINUX +#if !LL_LINUX && !__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 b9be75c528..b25c654e31 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(); |