From 4f817c0543ed20e4655198e0a05a8019fa795ee7 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 12 Jul 2023 15:09:44 +0800 Subject: Linux filesystem dir can still be used for FreeBSD --- indra/llfilesystem/lldir_linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llfilesystem') 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 -- cgit v1.3 From b8952a7df228abd03783665ece0e91e2f0fd63bd Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 12 Jul 2023 20:37:38 +0800 Subject: FreeBSD can use lldir_linux too --- indra/llfilesystem/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llfilesystem') diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 9f24f75eab..23193a30ea 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -30,7 +30,7 @@ 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) @@ -40,7 +40,7 @@ if (LINUX) "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\"" ) endif (INSTALL) -endif (LINUX) +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") if (WINDOWS) LIST(APPEND llfilesystem_SOURCE_FILES lldir_win32.cpp) -- cgit v1.3 From 665a55a1a232877ccb499dbfd17806f438385e82 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 29 Jul 2023 21:07:13 +0800 Subject: The Linden libraries can be installed now Useful when installed as shared libraries, so other viewer executables can share these libraries. --- indra/cmake/LibraryInstall.cmake | 4 ++++ indra/llappearance/CMakeLists.txt | 2 ++ indra/llcharacter/CMakeLists.txt | 2 ++ indra/llcommon/CMakeLists.txt | 7 +++++++ indra/llcorehttp/CMakeLists.txt | 2 ++ indra/llcrashlogger/CMakeLists.txt | 2 ++ indra/llfilesystem/CMakeLists.txt | 2 ++ indra/llimage/CMakeLists.txt | 2 ++ indra/llimagej2coj/CMakeLists.txt | 1 + indra/llinventory/CMakeLists.txt | 2 ++ indra/llmath/CMakeLists.txt | 3 +++ indra/llmeshoptimizer/CMakeLists.txt | 2 ++ indra/llmessage/CMakeLists.txt | 3 +++ indra/llplugin/CMakeLists.txt | 1 + indra/llprimitive/CMakeLists.txt | 2 ++ indra/llprimitive/llphysicsextensions/CMakeLists.txt | 6 ++++++ indra/llrender/CMakeLists.txt | 1 + indra/llui/CMakeLists.txt | 2 ++ indra/llwindow/CMakeLists.txt | 2 ++ indra/llxml/CMakeLists.txt | 1 + indra/viewer_components/login/CMakeLists.txt | 14 ++++++++------ 21 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 indra/cmake/LibraryInstall.cmake (limited to 'indra/llfilesystem') diff --git a/indra/cmake/LibraryInstall.cmake b/indra/cmake/LibraryInstall.cmake new file mode 100644 index 0000000000..5a55c215ed --- /dev/null +++ b/indra/cmake/LibraryInstall.cmake @@ -0,0 +1,4 @@ +list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES CMakeLists.txt) +install(FILES ${${PROJECT_NAME}_HEADER_FILES} + DESTINATION include/${PROJECT_NAME}) +install(TARGETS ${PROJECT_NAME} DESTINATION lib) diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index 75c0e276eb..e6ca2d753a 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -86,3 +86,5 @@ if (BUILD_HEADLESS) llcommon ) endif (BUILD_HEADLESS) + +include(LibraryInstall) diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index bc45eb474a..7c158c4ff9 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -70,3 +70,5 @@ target_link_libraries( llfilesystem llxml ) + +include(LibraryInstall) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 758d746d54..ed7ac8deb7 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -158,6 +158,7 @@ set(llcommon_HEADER_FILES lleventdispatcher.h lleventfilter.h llevents.h + lleventtimer.h lleventemitter.h llexception.h llfasttimer.h @@ -181,12 +182,14 @@ set(llcommon_HEADER_FILES llliveappconfig.h lllivefile.h llmainthreadtask.h + llmake.h llmd5.h llmemory.h llmemorystream.h llmetrics.h llmetricperformancetester.h llmortician.h + llmutex.h llnametable.h llpointer.h llprofiler.h @@ -243,7 +246,9 @@ set(llcommon_HEADER_FILES llwin32headerslean.h llworkerthread.h hbxxh.h + is_approx_equal_fraction.h lockstatic.h + mutex.h stdtypes.h stringize.h threadpool.h @@ -289,6 +294,8 @@ else () endif() endif () +include(LibraryInstall) + if (LL_TESTS) include(LLAddBuildTest) SET(llcommon_TEST_SOURCE_FILES diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 4fda964eb6..01ccdc048a 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -99,6 +99,8 @@ target_include_directories( llcorehttp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # lead to circular dependencies (or in case of cmake, the first project declaring it's dependencies wins) target_include_directories( llcorehttp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage) +include(LibraryInstall) + # tests set(LLCOREHTTP_TESTS ON CACHE BOOL "Build and run llcorehttp integration tests specifically") diff --git a/indra/llcrashlogger/CMakeLists.txt b/indra/llcrashlogger/CMakeLists.txt index 6ac73c0d32..3506a35c1e 100644 --- a/indra/llcrashlogger/CMakeLists.txt +++ b/indra/llcrashlogger/CMakeLists.txt @@ -21,3 +21,5 @@ list(APPEND llcrashlogger_SOURCE_FILES ${llcrashlogger_HEADER_FILES}) add_library(llcrashlogger ${llcrashlogger_SOURCE_FILES}) target_link_libraries( llcrashlogger llcommon llmessage llcorehttp llxml llfilesystem ) + +include(LibraryInstall) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 23193a30ea..6e9cec9085 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -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/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index f1eed409cd..a6c98d9bd7 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -73,6 +73,8 @@ if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) endif() endif () +include(LibraryInstall) + # Add tests if (LL_TESTS) SET(llimage_TEST_SOURCE_FILES diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index 5bd4c75426..5a2aac9e84 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -28,3 +28,4 @@ target_link_libraries( llimagej2coj ll::openjpeg ) +include(LibraryInstall) diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 93a586759f..88a2c33ae0 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -59,6 +59,8 @@ add_library (llinventory ${llinventory_SOURCE_FILES}) target_link_libraries( llinventory llcommon llmath llmessage llxml ) target_include_directories( llinventory INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) + #add unit tests if (LL_TESTS) INCLUDE(LLAddBuildTest) diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 955bade204..fe13d17fce 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -59,6 +59,7 @@ set(llmath_HEADER_FILES llmath.h llmatrix3a.h llmatrix3a.inl + llmatrix4a.h llmodularmath.h lloctree.h llperlin.h @@ -103,6 +104,8 @@ include_directories(${CMAKE_SOURCE_DIR}/llmeshoptimizer) target_link_libraries(llmath llcommon) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) + # Add tests if (LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llmeshoptimizer/CMakeLists.txt b/indra/llmeshoptimizer/CMakeLists.txt index dfac44c296..1511e75b39 100644 --- a/indra/llmeshoptimizer/CMakeLists.txt +++ b/indra/llmeshoptimizer/CMakeLists.txt @@ -30,5 +30,7 @@ target_link_libraries(llmeshoptimizer llmath ll::meshoptimizer) +include(LibraryInstall) + # Add tests diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 92a5f783e0..d5db3d8b1b 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -136,6 +136,7 @@ set(llmessage_HEADER_FILES llmessagebuilder.h llmessageconfig.h llmessagereader.h + llmessagesenderinterface.h llmessagetemplate.h llmessagetemplateparser.h llmessagethrottle.h @@ -210,6 +211,8 @@ if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) endif() endif () +include(LibraryInstall) + # tests if (LL_TESTS) SET(llmessage_TEST_SOURCE_FILES diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 14a69afe6e..19ce47d357 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -46,3 +46,4 @@ target_include_directories( llplugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llplugin llcommon llmath llrender llmessage ) add_subdirectory(slplugin) +include(LibraryInstall) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 3a3de75cd0..f26ab747af 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -72,6 +72,8 @@ if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) add_subdirectory(llphysicsextensions) endif () +include(LibraryInstall) + #add unit tests if (LL_TESTS) INCLUDE(LLAddBuildTest) diff --git a/indra/llprimitive/llphysicsextensions/CMakeLists.txt b/indra/llprimitive/llphysicsextensions/CMakeLists.txt index c950fc6560..c204dea264 100644 --- a/indra/llprimitive/llphysicsextensions/CMakeLists.txt +++ b/indra/llprimitive/llphysicsextensions/CMakeLists.txt @@ -74,6 +74,12 @@ list(APPEND llphysicsextensionsstub_SOURCE_FILES ${llphysicsextensions_HEADER_FI add_library(${PROJECT_NAME}stub ${${PROJECT_NAME}_SOURCE_FILES}) target_include_directories(${PROJECT_NAME}stub INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(${PROJECT_NAME}stub llmath llcommon) +list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES + LLPathingLibStubImpl.h + LLConvexDecompositionStubImpl.h + LLPhysicsExtensionsStubImpl.h) +install(FILES ${${PROJECT_NAME}_HEADER_FILES} DESTINATION include/${PROJECT_NAME}) +install(TARGETS ${PROJECT_NAME}stub DESTINATION lib) if (LINUX) IF(CMAKE_BUILD_TYPE MATCHES Release) diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index c5cf1100d5..ea8947155e 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -102,3 +102,4 @@ target_link_libraries(llrender OpenGL::GLU ) +include(LibraryInstall) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 9108c6143c..06416df09b 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -266,6 +266,8 @@ target_link_libraries(llui llcommon ) +include(LibraryInstall) + # Add tests if(LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 53b104dab2..cc44c1e2a1 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -186,3 +186,5 @@ if (DARWIN) find_library(CARBON_LIBRARY Carbon) target_link_libraries(llwindow ${CARBON_LIBRARY}) endif (DARWIN) + +include(LibraryInstall) diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 508c2b919b..748e3e8b61 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -34,6 +34,7 @@ target_link_libraries( llxml ) target_include_directories( llxml INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) # tests diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 8381803b03..d33b6d78f7 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -1,6 +1,6 @@ # -*- cmake -*- -project(login) +project(lllogin) include(00-Common) if(LL_TESTS) @@ -9,21 +9,21 @@ endif(LL_TESTS) include(LLCommon) include(LLCoreHttp) -set(login_SOURCE_FILES +set(lllogin_SOURCE_FILES lllogin.cpp ) -set(login_HEADER_FILES +set(lllogin_HEADER_FILES lllogin.h ) list(APPEND - login_SOURCE_FILES - ${login_HEADER_FILES} + lllogin_SOURCE_FILES + ${lllogin_HEADER_FILES} ) add_library(lllogin - ${login_SOURCE_FILES} + ${lllogin_SOURCE_FILES} ) target_include_directories( lllogin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -35,6 +35,8 @@ target_link_libraries(lllogin llxml ) +include(LibraryInstall) + if(LL_TESTS) SET(lllogin_TEST_SOURCE_FILES lllogin.cpp -- cgit v1.3 From e08ad14176502a8cc26b401c48b7161ce8c39140 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 30 Jul 2023 19:02:54 +0800 Subject: SLPlugin is in libexec when installed to system --- indra/cmake/UnixInstall.cmake | 4 ++++ indra/llfilesystem/CMakeLists.txt | 2 +- indra/llfilesystem/lldir_linux.cpp | 4 ++++ indra/llplugin/slplugin/CMakeLists.txt | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/llfilesystem') 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) -- cgit v1.3 From 00dc394684356a21d02a798f9ad098587381d142 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 26 Aug 2023 16:39:32 +0800 Subject: Certificate authority bundle gets installed too When I tried using, for example, FBSD system's ca-root-nss.crt, at runtime, the viewer would fail at downloading textures, avatar names, and so on. So for now we're still relying on LLCA, it's just get installed automatically without having to track the file in the viewer project. --- indra/llfilesystem/lldir_linux.cpp | 2 +- indra/newview/ViewerInstall.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llfilesystem') diff --git a/indra/llfilesystem/lldir_linux.cpp b/indra/llfilesystem/lldir_linux.cpp index 300cab39d6..7e8fe157ba 100644 --- a/indra/llfilesystem/lldir_linux.cpp +++ b/indra/llfilesystem/lldir_linux.cpp @@ -209,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/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 39764f22a0..43d3060bb9 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -21,6 +21,7 @@ endif (IS_ARTWORK_PRESENT) install(FILES featuretable_linux.txt #featuretable_solaris.txt + ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt DESTINATION share/${VIEWER_BINARY_NAME} ) -- cgit v1.3