From e08b527caf6462f2fe94130249aec8ad44a8c83e Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 12 Jul 2023 17:04:41 +0800 Subject: FreeBSD follows Darwin & Linux on llplugin --- indra/llplugin/llpluginsharedmemory.cpp | 2 ++ indra/llplugin/slplugin/slplugin.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index 63ff5085c6..c4e70f51e0 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -47,6 +47,8 @@ #define USE_SHM_OPEN_SHARED_MEMORY 1 #elif LL_LINUX #define USE_SHM_OPEN_SHARED_MEMORY 1 +#elif LL_FREEBSD + #define USE_SHM_OPEN_SHARED_MEMORY 1 #endif diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 5c54705c71..3e9dc8cd31 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -46,7 +46,7 @@ using namespace std; #include "slplugin-objc.h" #endif -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || LL_FREEBSD #include #endif @@ -64,7 +64,7 @@ using namespace std; Now that SLPlugin is a bundled app on the Mac, this is no longer necessary (it can just use a regular Info.plist file), but I'm leaving this comment in for posterity. */ -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || LL_FREEBSD // Signal handlers to make crashes not show an OS dialog... static void crash_handler(int sig) { @@ -182,7 +182,7 @@ int main(int argc, char **argv) // display a crash message if something bad happens. The host app will // see the missing heartbeat and log appropriately. initExceptionHandler(); -#elif LL_DARWIN || LL_LINUX +#elif LL_DARWIN || LL_LINUX || LL_FREEBSD if(argc < 2) { LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL; -- cgit v1.3 From 6e4f095baa8e33effe80b68ddf834a3b80f2bb67 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 29 Jul 2023 20:58:27 +0800 Subject: Setting BUILD_SHARED_LIBS on is now possible by removing cyclic dependencies, and allowing shlib undefined on SLPlugin alone. --- indra/llimagej2coj/CMakeLists.txt | 3 ++- indra/llmath/CMakeLists.txt | 3 ++- indra/llplugin/slplugin/CMakeLists.txt | 5 +++++ indra/llwindow/CMakeLists.txt | 5 ++++- 4 files changed, 13 insertions(+), 3 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index 93e85668dd..5bd4c75426 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -21,9 +21,10 @@ list(APPEND llimagej2coj_SOURCE_FILES ${llimagej2coj_HEADER_FILES}) add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES}) +include_directories( ${CMAKE_SOURCE_DIR}/llimage ) target_link_libraries( llimagej2coj llcommon - llimage + #llimage ll::openjpeg ) diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index eb29df245a..955bade204 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -99,7 +99,8 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) -target_link_libraries(llmath llcommon llmeshoptimizer) +include_directories(${CMAKE_SOURCE_DIR}/llmeshoptimizer) +target_link_libraries(llmath llcommon) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 0ea6495eac..f1a75ff97f 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -60,6 +60,11 @@ if (DARWIN) ) endif (DARWIN) +if (BUILD_SHARED_LIBS) + set_target_properties(SLPlugin PROPERTIES LINK_FLAGS_RELEASE + "${LINK_FLAGS_RELEASE} -Wl,--allow-shlib-undefined") +endif () + if (LL_TESTS) ll_deploy_sharedlibs_command(SLPlugin) endif (LL_TESTS) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index c2989e84c9..53b104dab2 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -51,7 +51,7 @@ set(llwindow_LINK_LIBRARIES llcommon llimage llmath - llrender + #llrender llfilesystem llxml ll::glh_linear @@ -59,6 +59,9 @@ set(llwindow_LINK_LIBRARIES ll::uilibraries ll::SDL ) + +include_directories(${CMAKE_SOURCE_DIR}/llrender) + # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") -- 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/llplugin') 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 9aac948d59cee9bce12098b060d94aeba33efa86 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 30 Jul 2023 17:26:55 +0800 Subject: llplugin not refer to gSavedSettings when no CEF so SLPlugin wouldn't lose reference to it when the libraries are built as dynamic. --- indra/llplugin/llpluginclassmedia.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 3e72710366..e0b3f6ef56 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -33,7 +33,9 @@ #include "llpluginmessageclasses.h" #include "llcontrol.h" +#ifndef LL_USESYSTEMLIBS extern LLControlGroup gSavedSettings; +#endif #if LL_DARWIN extern BOOL gHiDPISupport; #endif @@ -934,8 +936,10 @@ void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache message.setValue("username", username); // cef shares cache between users but creates user-based contexts message.setValue("cef_log_file", user_data_path_cef_log); +#ifndef LL_USESYSTEMLIBS bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog"); message.setValueBoolean("cef_verbose_log", cef_verbose_log); +#endif sendMessage(message); } -- 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/llplugin') 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 7dd1149e3649057f0962b85bdc467f4e9299b235 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 21 Aug 2023 17:35:54 +0800 Subject: Darwin not (directly) relying on Carbon & Obj-C HiDPI support & multi threaded OpenGL haven't been used since we switched to SDL2 on Darwin, and so far there hasn't been any sign that things aren't working any more significantly. --- indra/llplugin/llpluginclassmedia.cpp | 4 ++-- indra/llwindow/CMakeLists.txt | 8 ++++---- indra/llwindow/llkeyboard.h | 2 +- indra/newview/llappviewer.cpp | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index e0b3f6ef56..2d19e3df90 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -36,7 +36,7 @@ #ifndef LL_USESYSTEMLIBS extern LLControlGroup gSavedSettings; #endif -#if LL_DARWIN +#if LL_DARWIN && !LL_SDL extern BOOL gHiDPISupport; #endif @@ -370,7 +370,7 @@ void LLPluginClassMedia::setSizeInternal(void) mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight); } -#if LL_DARWIN +#if LL_DARWIN && !LL_SDL if (!gHiDPISupport) #endif { diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 9cf31d60d5..120fd1213d 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -89,7 +89,7 @@ if (USESYSTEMLIBS) endif (USESYSTEMLIBS) -if (DARWIN) +if (DARWIN AND (NOT USESYSTEMLIBS)) list(APPEND llwindow_SOURCE_FILES llkeyboardmacosx.cpp llwindowmacosx.cpp @@ -111,7 +111,7 @@ if (DARWIN) PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -fpascal-strings" ) -endif (DARWIN) +endif (DARWIN AND (NOT USESYSTEMLIBS)) if (WINDOWS) @@ -181,10 +181,10 @@ endif (SDL_FOUND) target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) target_include_directories(llwindow INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -if (DARWIN) +if (DARWIN AND (NOT USESYSTEMLIBS)) include(CMakeFindFrameworks) find_library(CARBON_LIBRARY Carbon) target_link_libraries(llwindow ${CARBON_LIBRARY}) -endif (DARWIN) +endif (DARWIN AND (NOT USESYSTEMLIBS)) include(LibraryInstall) diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index 2a700ce8e9..0cfba78c5b 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -76,7 +76,7 @@ public: virtual BOOL handleKeyUp(const U32 key, MASK mask) = 0; virtual BOOL handleKeyDown(const U32 key, MASK mask) = 0; -#ifdef LL_DARWIN +#if defined(LL_DARWIN) && !defined(LL_SDL) // We only actually use this for OS X. virtual void handleModifier(MASK mask) = 0; #endif // LL_DARWIN diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 23e6b16103..a63785990f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -288,7 +288,7 @@ extern BOOL gRandomizeFramerate; extern BOOL gPeriodicSlowFrame; extern BOOL gDebugGL; -#if LL_DARWIN +#if LL_DARWIN && !LL_SDL extern BOOL gHiDPISupport; #endif @@ -568,7 +568,7 @@ static void settings_to_globals() gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); LLWorldMapView::setScaleSetting(gSavedSettings.getF32("MapScale")); -#if LL_DARWIN +#if LL_DARWIN && !LL_SDL LLWindowMacOSX::sUseMultGL = gSavedSettings.getBOOL("RenderAppleUseMultGL"); gHiDPISupport = gSavedSettings.getBOOL("RenderHiDPI"); #endif @@ -3310,7 +3310,7 @@ LLSD LLAppViewer::getViewerInfo() const info["GPU_SHADERS"] = gSavedSettings.getBOOL("RenderDeferred") ? "Enabled" : "Disabled"; info["TEXTURE_MEMORY"] = gSavedSettings.getS32("TextureMemory"); -#if LL_DARWIN +#if LL_DARWIN && !LL_SDL info["HIDPI"] = gHiDPISupport; #endif -- cgit v1.3 From 00be9e00107c51a35c04f64fe917c559b8325564 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 26 Aug 2023 15:46:12 +0800 Subject: CPack for packaging (when PACKAGE set to on) Since we could use the dynamic versioning from the configuration phase of CMake, the inclusion is put in BuildVersion.cmake. Other CPACK variables are usually static so can be set when running cmake. CPack somehow doesn't pick up the DESTINATION values in ViewerInstall (slplugin & libvlc too) from UnixInstall, so they're they're partially hardcoded again there. --- indra/cmake/BuildVersion.cmake | 6 ++++++ indra/llplugin/slplugin/CMakeLists.txt | 2 +- indra/media_plugins/libvlc/CMakeLists.txt | 3 ++- indra/newview/CMakeLists.txt | 4 ++++ indra/newview/ViewerInstall.cmake | 12 ++++++------ 5 files changed, 19 insertions(+), 8 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index b531f29ee2..a56829bf14 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -55,4 +55,10 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n "LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}" "LLBUILD_CONFIG=\"${CMAKE_BUILD_TYPE}\"" ) +if (PACKAGE) + include(CPack) + set(CPACK_PACKAGE_VERSION + ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} + CACHE STRING "Viewer major.minor.patch.revision versions.") +endif (PACKAGE) endif (NOT DEFINED VIEWER_SHORT_VERSION) diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 871d858b58..e86ddd8a32 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -66,7 +66,7 @@ if (BUILD_SHARED_LIBS) endif () if (INSTALL) - install(TARGETS ${PROJECT_NAME} DESTINATION ${APP_LIBEXEC_DIR}) + install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME}) endif () if (LL_TESTS) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index cdaf3efbfa..84fac1634c 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -57,5 +57,6 @@ if (DARWIN) endif (DARWIN) if (INSTALL) - install(TARGETS ${PROJECT_NAME} DESTINATION ${APP_LIBEXEC_DIR}/llplugin) + install(TARGETS ${PROJECT_NAME} DESTINATION + libexec/${VIEWER_BINARY_NAME}/llplugin) endif () diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 226f9a3bda..b5c88cfca1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1955,6 +1955,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") -Wno-stringop-truncation) endif () +if (NOT USESYSTEMLIBS) + if (LINUX) set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}) @@ -2141,6 +2143,8 @@ if (DARWIN) endif (PACKAGE) endif (DARWIN) +endif (NOT USESYSTEMLIBS) + if (INSTALL) include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake) endif (INSTALL) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index e321d7e563..af5876f411 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -1,9 +1,9 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME} - DESTINATION ${APP_BINARY_DIR} + DESTINATION bin ) install(DIRECTORY skins app_settings linux_tools - DESTINATION ${APP_SHARE_DIR} + DESTINATION share/${VIEWER_BINARY_NAME} PATTERN ".svn" EXCLUDE ) @@ -12,7 +12,7 @@ find_file(IS_ARTWORK_PRESENT NAMES have_artwork_bundle.marker if (IS_ARTWORK_PRESENT) install(DIRECTORY res res-sdl character - DESTINATION ${APP_SHARE_DIR} + DESTINATION share/${VIEWER_BINARY_NAME} PATTERN ".svn" EXCLUDE ) else (IS_ARTWORK_PRESENT) @@ -20,10 +20,10 @@ else (IS_ARTWORK_PRESENT) endif (IS_ARTWORK_PRESENT) install(FILES featuretable_linux.txt - #featuretable_solaris.txt - DESTINATION ${APP_SHARE_DIR} + #featuretable_solaris.txt + DESTINATION share/${VIEWER_BINARY_NAME} ) install(FILES ${SCRIPTS_DIR}/messages/message_template.msg - DESTINATION ${APP_SHARE_DIR}/app_settings + DESTINATION share/${VIEWER_BINARY_NAME}/app_settings ) -- cgit v1.3 From 62626f175b6549b62ba8538800957cab613b7ffa Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 7 Sep 2023 11:29:17 +0800 Subject: Implementations without shm_unlink can use APR --- indra/llplugin/llpluginsharedmemory.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index c4e70f51e0..3204bbd715 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -45,6 +45,8 @@ #define USE_WIN32_SHARED_MEMORY 1 #elif LL_DARWIN #define USE_SHM_OPEN_SHARED_MEMORY 1 +#elif _POSIX_SHARED_MEMORY_OBJECTS == -1 + #define USE_APR_SHARED_MEMORY 1 #elif LL_LINUX #define USE_SHM_OPEN_SHARED_MEMORY 1 #elif LL_FREEBSD -- cgit v1.3