From c8711f4ea5d941d12ae7e6cf99302bfc3211dd3c Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 5 Sep 2023 22:22:56 +0300 Subject: Initial prototype of embedded LUA --- indra/cmake/CMakeLists.txt | 1 + indra/cmake/Copy3rdPartyLibs.cmake | 1 + indra/cmake/Lualibs.cmake | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 indra/cmake/Lualibs.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index f0b35c08f3..af01666875 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -43,6 +43,7 @@ set(cmake_SOURCE_FILES LLTestCommand.cmake LLWindow.cmake Linking.cmake + Lualibs.cmake Meshoptimizer.cmake NDOF.cmake OPENAL.cmake diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index d43cc30706..8ae1b5dde5 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -61,6 +61,7 @@ if(WINDOWS) nghttp2.dll libhunspell.dll uriparser.dll + lua54.dll ) # OpenSSL diff --git a/indra/cmake/Lualibs.cmake b/indra/cmake/Lualibs.cmake new file mode 100644 index 0000000000..ec40d0f41c --- /dev/null +++ b/indra/cmake/Lualibs.cmake @@ -0,0 +1,15 @@ +# -*- cmake -*- + +include_guard() + +include(Prebuilt) + +add_library( ll::lualibs INTERFACE IMPORTED ) + +use_system_binary( lualibs ) + +use_prebuilt_binary(lualibs) + +target_link_libraries(ll::lualibs INTERFACE ${lualibs}) + +target_include_directories( ll::lualibs SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/lualibs) -- cgit v1.2.3 From bb51ead8815d6f1843bed3f16dfae94aa0e85950 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 2 Nov 2023 09:08:25 -0400 Subject: DRTVWR-589: Switch to the lua package built by new 3p-lua repo. Also ditch crufty CMake logic related to lleventhost, which we haven't used for years. --- indra/cmake/Lualibs.cmake | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Lualibs.cmake b/indra/cmake/Lualibs.cmake index ec40d0f41c..e7d5875198 100644 --- a/indra/cmake/Lualibs.cmake +++ b/indra/cmake/Lualibs.cmake @@ -8,8 +8,15 @@ add_library( ll::lualibs INTERFACE IMPORTED ) use_system_binary( lualibs ) -use_prebuilt_binary(lualibs) +use_prebuilt_binary(lua) -target_link_libraries(ll::lualibs INTERFACE ${lualibs}) +target_include_directories( ll::lualibs SYSTEM INTERFACE + ${LIBS_PREBUILT_DIR}/include +) -target_include_directories( ll::lualibs SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/lualibs) +if (WINDOWS) + target_link_libraries(ll::lualibs INTERFACE lua54.dll) +elseif (DARWIN) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/liblua.a) +elseif (LINUX) +endif (WINDOWS) -- cgit v1.2.3 From f80ede0a752447d81086f672001a562e4492553f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 2 Nov 2023 17:46:04 -0400 Subject: DRTVWR-589: Update Lualibs.cmake to use lua54.lib from 3p-lua. Also remove #pragma comment(lib, "liblua54.a") from relevant source files. --- indra/cmake/Lualibs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Lualibs.cmake b/indra/cmake/Lualibs.cmake index e7d5875198..b6a7de41c6 100644 --- a/indra/cmake/Lualibs.cmake +++ b/indra/cmake/Lualibs.cmake @@ -15,7 +15,7 @@ target_include_directories( ll::lualibs SYSTEM INTERFACE ) if (WINDOWS) - target_link_libraries(ll::lualibs INTERFACE lua54.dll) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/lua54.lib) elseif (DARWIN) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/liblua.a) elseif (LINUX) -- cgit v1.2.3 From 81e1963f57d3a8a189cc78beb9c6acee1b0e129b Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 26 Jan 2024 16:49:19 +0200 Subject: DRTVWR-589: update to start using Luau libs --- indra/cmake/Copy3rdPartyLibs.cmake | 1 - indra/cmake/Lualibs.cmake | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index c2f4949bb7..7938d4f54b 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -60,7 +60,6 @@ if(WINDOWS) nghttp2.dll libhunspell.dll uriparser.dll - lua54.dll ) # OpenSSL diff --git a/indra/cmake/Lualibs.cmake b/indra/cmake/Lualibs.cmake index b6a7de41c6..2832cc1fc9 100644 --- a/indra/cmake/Lualibs.cmake +++ b/indra/cmake/Lualibs.cmake @@ -8,15 +8,16 @@ add_library( ll::lualibs INTERFACE IMPORTED ) use_system_binary( lualibs ) -use_prebuilt_binary(lua) +use_prebuilt_binary(luau) target_include_directories( ll::lualibs SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) if (WINDOWS) - target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/lua54.lib) -elseif (DARWIN) - target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/liblua.a) -elseif (LINUX) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.Ast.lib) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.CodeGen.lib) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.Compiler.lib) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.Config.lib) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.VM.lib) endif (WINDOWS) -- cgit v1.2.3 From 6e6fb924ecdb4257884e9012f9cbbf9193cf8c94 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 29 Jan 2024 16:38:02 +0200 Subject: DRTVWR-589: add mac luau libs --- indra/cmake/Lualibs.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Lualibs.cmake b/indra/cmake/Lualibs.cmake index 2832cc1fc9..7edfbfdc3d 100644 --- a/indra/cmake/Lualibs.cmake +++ b/indra/cmake/Lualibs.cmake @@ -20,4 +20,10 @@ if (WINDOWS) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.Compiler.lib) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.Config.lib) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.VM.lib) +elseif (DARWIN) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.Ast.a) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.CodeGen.a) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.Compiler.a) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.Config.a) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.VM.a) endif (WINDOWS) -- cgit v1.2.3 From 48ceae34a1dacd9305917be19868129dd47b7b1f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 22 Feb 2024 19:49:48 -0500 Subject: Slightly modernize run_build_test.py. --- indra/cmake/run_build_test.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index 1f040bded5..ef4d712254 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -122,19 +122,17 @@ def main(command, arguments=[], libpath=[], vars={}): # Make sure we see all relevant output *before* child-process output. sys.stdout.flush() try: - return subprocess.call(command_list) - except OSError as err: + return subprocess.run(command_list).returncode + except FileNotFoundError as err: # If the caller is trying to execute a test program that doesn't # exist, we want to produce a reasonable error message rather than a # traceback. This happens when the build is halted by errors, but # CMake tries to proceed with testing anyway . However, do # NOT attempt to handle any error but "doesn't exist." - if err.errno != errno.ENOENT: - raise # In practice, the pathnames into CMake's build tree are so long as to # obscure the name of the test program. Just log its basename. - log.warn("No such program %s; check for preceding build errors" % \ - os.path.basename(command[0])) + log.warning("No such program %s; check for preceding build errors" % + os.path.basename(command[0])) # What rc should we simulate for missing executable? Windows produces # 9009. return 9009 -- cgit v1.2.3 From 8a3f537cf8967cf28482f321b00a03949773d8f5 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 8 Mar 2024 10:46:16 -0500 Subject: Emit a CMake message when running autobuild install. This helps to explain the lengthy delay when running autobuild configure in a new developer work area. --- indra/cmake/Prebuilt.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 634cc15c21..a8c702bfef 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -40,6 +40,7 @@ macro (use_prebuilt_binary _binary) --install-dir=${AUTOBUILD_INSTALL_DIR} ${_binary} ") endif(DEBUG_PREBUILT) + message(STATUS "Installing ${_binary}...") execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" install --install-dir=${AUTOBUILD_INSTALL_DIR} -- cgit v1.2.3 From 4173fa1a9ef79c27d39d9ab9dbee46f109fbf510 Mon Sep 17 00:00:00 2001 From: AiraYumi Date: Sat, 30 Mar 2024 06:59:21 -0400 Subject: linux build fix --- indra/cmake/Copy3rdPartyLibs.cmake | 14 +++++++------- indra/cmake/ICU4C.cmake | 4 ++-- indra/cmake/ViewerMiscLibs.cmake | 3 ++- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 9f79c13a97..48930c1c19 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -225,14 +225,14 @@ elseif(LINUX) libapr-1.so.0 libaprutil-1.so.0 libatk-1.0.so - libfreetype.so.6.6.2 - libfreetype.so.6 + #libfreetype.so.6.6.2 + #libfreetype.so.6 libhunspell-1.3.so.0.0.0 - libopenjp2.so - libuuid.so.16 - libuuid.so.16.0.22 - libfontconfig.so.1.8.0 - libfontconfig.so.1 + #libopenjp2.so + #libuuid.so.16 + #libuuid.so.16.0.22 + #libfontconfig.so.1.8.0 + #libfontconfig.so.1 libgmodule-2.0.so libgobject-2.0.so ) diff --git a/indra/cmake/ICU4C.cmake b/indra/cmake/ICU4C.cmake index 7b27665483..a9714696b4 100644 --- a/indra/cmake/ICU4C.cmake +++ b/indra/cmake/ICU4C.cmake @@ -12,8 +12,8 @@ if (WINDOWS) target_link_libraries( ll::icu4c INTERFACE icuuc) elseif(DARWIN) target_link_libraries( ll::icu4c INTERFACE icuuc) -#elseif(LINUX) -## target_link_libraries( ll::icu4c INTERFACE ) +elseif(LINUX) + target_link_libraries( ll::icu4c INTERFACE icuuc) else() message(FATAL_ERROR "Invalid platform") endif() diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index cae68fbc11..3e5a37b277 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -6,7 +6,8 @@ if (LINUX) add_library( ll::fontconfig INTERFACE IMPORTED ) if( NOT USE_CONAN ) - use_prebuilt_binary(fontconfig) + find_package(Fontconfig REQUIRED) + target_link_libraries( ll::fontconfig INTERFACE Fontconfig::Fontconfig ) else() target_link_libraries( ll::fontconfig INTERFACE CONAN_PKG::fontconfig ) endif() -- cgit v1.2.3 From c8f7e9d0256cec90d509b0cf0109c2c7479100d0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 3 Apr 2024 21:24:56 +0200 Subject: - Enable luaulib linking for Linux - Put lubLuau.Ast.a at the right most side as GCC/LD is peculiar about link order. --- indra/cmake/Lualibs.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Lualibs.cmake b/indra/cmake/Lualibs.cmake index 7edfbfdc3d..d66305a8e5 100644 --- a/indra/cmake/Lualibs.cmake +++ b/indra/cmake/Lualibs.cmake @@ -20,10 +20,10 @@ if (WINDOWS) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.Compiler.lib) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.Config.lib) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/Luau.VM.lib) -elseif (DARWIN) - target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.Ast.a) +else () target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.CodeGen.a) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.Compiler.a) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.Config.a) target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.VM.a) -endif (WINDOWS) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libLuau.Ast.a) +endif () -- cgit v1.2.3 From 57d423745fd1d3d0ea6a0c69b869a20c27e27fc5 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 5 Apr 2024 19:25:02 +0200 Subject: Linux viewer (ReleaseOS) resurrection (#1099) Co-authored-by: AiraYumi --- indra/cmake/00-Common.cmake | 38 ++++++++++++------ indra/cmake/Audio.cmake | 2 +- indra/cmake/Boost.cmake | 6 +-- indra/cmake/CMakeLists.txt | 1 - indra/cmake/ConfigurePkgConfig.cmake | 74 ------------------------------------ indra/cmake/Copy3rdPartyLibs.cmake | 10 ----- indra/cmake/FreeType.cmake | 13 ++++--- indra/cmake/GLIB.cmake | 22 +++++++++++ indra/cmake/GStreamer10Plugin.cmake | 27 +++++++++++++ indra/cmake/ICU4C.cmake | 2 +- indra/cmake/JsonCpp.cmake | 2 +- indra/cmake/LLAddBuildTest.cmake | 7 ++++ indra/cmake/LLWindow.cmake | 14 +++---- indra/cmake/Meshoptimizer.cmake | 2 +- indra/cmake/UI.cmake | 45 +++++++++++++--------- indra/cmake/Variables.cmake | 2 - indra/cmake/ViewerMiscLibs.cmake | 9 +---- 17 files changed, 132 insertions(+), 144 deletions(-) delete mode 100644 indra/cmake/ConfigurePkgConfig.cmake create mode 100644 indra/cmake/GLIB.cmake create mode 100644 indra/cmake/GStreamer10Plugin.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 24534c98d9..486071a2df 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -87,7 +87,7 @@ if (WINDOWS) if( ADDRESS_SIZE EQUAL 32 ) add_compile_options( /arch:SSE2 ) endif() - + # Are we using the crummy Visual Studio KDU build workaround? if (NOT VS_DISABLE_FATAL_WARNINGS) add_compile_options(/WX) @@ -107,7 +107,15 @@ endif (WINDOWS) if (LINUX) - set(CMAKE_SKIP_RPATH TRUE) + set( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE ) + set( CMAKE_INSTALL_RPATH $ORIGIN $ORIGIN/../lib ) + set(CMAKE_EXE_LINKER_FLAGS "-Wl,--exclude-libs,ALL") + + find_program(CCACHE_EXE ccache) + if(CCACHE_EXE AND NOT DISABLE_CCACHE) + set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_EXE} ) + set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXE} ) + endif() # EXTERNAL_TOS # force this platform to accept TOS via external browser @@ -134,21 +142,28 @@ if (LINUX) -pthread -Wno-parentheses -Wno-deprecated + -Wno-c++20-compat + -Wno-pessimizing-move + -Wno-stringop-overflow + -Wno-stringop-truncation -fvisibility=hidden ) - - if (ADDRESS_SIZE EQUAL 32) - add_compile_options(-march=pentium4) - endif (ADDRESS_SIZE EQUAL 32) + add_link_options( + -Wl,--no-keep-memory + -Wl,--build-id + ) # this stops us requiring a really recent glibc at runtime add_compile_options(-fno-stack-protector) # linking can be very memory-hungry, especially the final viewer link set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") - set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") -endif (LINUX) + # ND: clang is a bit more picky than GCC, the latter seems to auto include -lstdc++ and -lm. The former not so and thus fails to link + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -lstdc++ -lm") + endif() +endif (LINUX) if (DARWIN) # Warnings should be fatal -- thanks, Nicky Perian, for spotting reversed default @@ -182,9 +197,10 @@ if (LINUX OR DARWIN) list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor ) + if(LINUX) + list(APPEND GCC_WARNINGS -Wno-maybe-uninitialized -Wno-misleading-indentation -Wno-stringop-truncation -Wno-unused-value ) + endif() + add_compile_options(${GCC_WARNINGS}) add_compile_options(-m${ADDRESS_SIZE}) endif (LINUX OR DARWIN) - - - diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index 38547bb017..5efaff07c7 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -11,6 +11,6 @@ target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/inc if (WINDOWS) target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static ) else (WINDOWS) - target_link_libraries(ll::vorbis INTERFACE ogg vorbis vorbisenc vorbisfile ) + target_link_libraries(ll::vorbis INTERFACE vorbisfile vorbis ogg vorbisenc ) endif (WINDOWS) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 601a23a86d..293d8931cb 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -27,14 +27,14 @@ if (WINDOWS) libboost_thread-mt${addrsfx}) elseif (LINUX) target_link_libraries( ll::boost INTERFACE - boost_context-mt${addrsfx} boost_fiber-mt${addrsfx} + boost_context-mt${addrsfx} boost_filesystem-mt${addrsfx} boost_program_options-mt${addrsfx} boost_regex-mt${addrsfx} - boost_signals-mt${addrsfx} + boost_thread-mt${addrsfx} boost_system-mt${addrsfx} - boost_thread-mt${addrsfx}) + ) elseif (DARWIN) target_link_libraries( ll::boost INTERFACE boost_context-mt${addrsfx} diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 05c51c018d..3a7fe7302e 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -15,7 +15,6 @@ set(cmake_SOURCE_FILES CEFPlugin.cmake CEFPlugin.cmake CMakeCopyIfDifferent.cmake - ConfigurePkgConfig.cmake CURL.cmake Copy3rdPartyLibs.cmake DBusGlib.cmake diff --git a/indra/cmake/ConfigurePkgConfig.cmake b/indra/cmake/ConfigurePkgConfig.cmake deleted file mode 100644 index 55d865392e..0000000000 --- a/indra/cmake/ConfigurePkgConfig.cmake +++ /dev/null @@ -1,74 +0,0 @@ -# -*- cmake -*- - -SET(DEBUG_PKG_CONFIG "YES") - -# Don't change this if manually set by user. -IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") - - # Guess at architecture-specific system library paths. - if (ADDRESS_SIZE EQUAL 32) - SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib) - SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib) - SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu) - SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu) - else (ADDRESS_SIZE EQUAL 32) - SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib) - SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib) - SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu) - SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu) - endif (ADDRESS_SIZE EQUAL 32) - - # Use DPKG architecture, if available. - IF (${DPKG_ARCH}) - SET(PKG_CONFIG_MULTI_GUESS /usr/lib/${DPKG_ARCH}) - SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usrlocal/lib/${DPKG_ARCH}) - ENDIF (${DPKG_ARCH}) - - # Explicitly include anything listed in PKG_CONFIG_PATH - string(REPLACE ":" ";" PKG_CONFIG_PATH_LIST "$ENV{PKG_CONFIG_PATH}") - FOREACH(PKG_CONFIG_DIR ${PKG_CONFIG_PATH_LIST}) - SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_DIR}/pkgconfig") - ENDFOREACH(PKG_CONFIG_DIR) - - # Look for valid pkgconfig directories. - FIND_PATH(PKG_CONFIG_ENV pkgconfig ENV LD_LIBRARY_PATH) - FIND_PATH(PKG_CONFIG_MULTI pkgconfig HINT ${PKG_CONFIG_MULTI_GUESS}) - FIND_PATH(PKG_CONFIG_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_MULTI_LOCAL_GUESS}) - FIND_PATH(PKG_CONFIG_NO_MULTI pkgconfig HINT ${PKG_CONFIG_NO_MULTI_GUESS}) - FIND_PATH(PKG_CONFIG_NO_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_NO_MULTI_LOCAL_GUESS}) - - # Add anything we found to our list. - IF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND) - SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_ENV}/pkgconfig") - ENDIF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND) - - IF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND) - SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI}/pkgconfig") - ENDIF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND) - - IF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND) - SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI_LOCAL}/pkgconfig") - ENDIF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND) - - IF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND) - SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI}/pkgconfig") - ENDIF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND) - - IF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND) - SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI_LOCAL}/pkgconfig") - ENDIF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND) - - # Also add some non-architecture specific package locations. - SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:/usr/share/pkgconfig:/usr/local/share/pkgconfig") - - # Remove first unwanted ':' - string(SUBSTRING ${VALID_PKG_LIBDIRS} 1 -1 VALID_PKG_LIBDIRS) - - # Set PKG_CONFIG_LIBDIR environment. - SET(ENV{PKG_CONFIG_LIBDIR} ${VALID_PKG_LIBDIRS}) -ENDIF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") - -IF(DEBUG_PKG_CONFIG) - MESSAGE(STATUS "Using PKG_CONFIG_LIBDIR=$ENV{PKG_CONFIG_LIBDIR}") -ENDIF(DEBUG_PKG_CONFIG) - diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 48930c1c19..9f577bc9bc 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -224,17 +224,7 @@ elseif(LINUX) list( APPEND release_files libapr-1.so.0 libaprutil-1.so.0 - libatk-1.0.so - #libfreetype.so.6.6.2 - #libfreetype.so.6 libhunspell-1.3.so.0.0.0 - #libopenjp2.so - #libuuid.so.16 - #libuuid.so.16.0.22 - #libfontconfig.so.1.8.0 - #libfontconfig.so.1 - libgmodule-2.0.so - libgobject-2.0.so ) endif() diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 77140af641..e7e28a44d0 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -4,8 +4,11 @@ include(Prebuilt) include_guard() add_library( ll::freetype INTERFACE IMPORTED ) -use_system_binary(freetype) -use_prebuilt_binary(freetype) -target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) -target_link_libraries( ll::freetype INTERFACE freetype ) - + use_system_binary(freetype) + use_prebuilt_binary(freetype) + target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) +if( LINUX ) + target_link_libraries( ll::freetype INTERFACE ${LIBS_PREBUILT_DIR}/lib/release/libfreetype.a ${LIBS_PREBUILT_DIR}/lib/release/libpng16.a) +else() + target_link_libraries( ll::freetype INTERFACE freetype ) +endif() diff --git a/indra/cmake/GLIB.cmake b/indra/cmake/GLIB.cmake new file mode 100644 index 0000000000..f52cbb7f87 --- /dev/null +++ b/indra/cmake/GLIB.cmake @@ -0,0 +1,22 @@ +include_guard() + +include(Prebuilt) + +add_library( ll::glib INTERFACE IMPORTED ) +add_library( ll::glib_headers INTERFACE IMPORTED ) +add_library( ll::gio INTERFACE IMPORTED ) + +if( LINUX ) + find_package(PkgConfig REQUIRED) + pkg_search_module(GLIB REQUIRED glib-2.0) + pkg_search_module(GIO REQUIRED gio-2.0) + + target_include_directories( ll::glib SYSTEM INTERFACE ${GLIB_INCLUDE_DIRS} ) + target_link_libraries( ll::glib INTERFACE ${GLIB_LDFLAGS} ) + target_compile_definitions( ll::glib INTERFACE -DLL_GLIB=1) + + target_include_directories( ll::glib_headers SYSTEM INTERFACE ${GLIB_INCLUDE_DIRS} ) + target_compile_definitions( ll::glib_headers INTERFACE -DLL_GLIB=1) + + target_link_libraries( ll::gio INTERFACE ${GIO_LDFLAGS} ) +endif() diff --git a/indra/cmake/GStreamer10Plugin.cmake b/indra/cmake/GStreamer10Plugin.cmake new file mode 100644 index 0000000000..da2e33d04d --- /dev/null +++ b/indra/cmake/GStreamer10Plugin.cmake @@ -0,0 +1,27 @@ +# -*- cmake -*- + +include_guard() + +include(Prebuilt) +include(GLIB) + +add_library( ll::gstreamer10 INTERFACE IMPORTED ) + +if (LINUX) + include(FindPkgConfig) + + pkg_check_modules(GSTREAMER10 REQUIRED gstreamer-1.0) + pkg_check_modules(GSTREAMER10_PLUGINS_BASE REQUIRED gstreamer-plugins-base-1.0) + + target_include_directories( ll::gstreamer10 SYSTEM INTERFACE ${GSTREAMER10_INCLUDE_DIRS}) + target_link_libraries( ll::gstreamer10 INTERFACE ll::glib_headers) + +endif () + +if (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND) + set(GSTREAMER10 ON CACHE BOOL "Build with GStreamer-1.0 streaming media support.") +endif (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND) + +if (GSTREAMER10) + add_definitions(-DLL_GSTREAMER10_ENABLED=1) +endif (GSTREAMER10) diff --git a/indra/cmake/ICU4C.cmake b/indra/cmake/ICU4C.cmake index a9714696b4..8382ceef1e 100644 --- a/indra/cmake/ICU4C.cmake +++ b/indra/cmake/ICU4C.cmake @@ -13,7 +13,7 @@ if (WINDOWS) elseif(DARWIN) target_link_libraries( ll::icu4c INTERFACE icuuc) elseif(LINUX) - target_link_libraries( ll::icu4c INTERFACE icuuc) + target_link_libraries( ll::icu4c INTERFACE ${LIBS_PREBUILT_DIR}/lib/libicuuc.a) else() message(FATAL_ERROR "Invalid platform") endif() diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 17f8e47a97..a9b992ab20 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -12,6 +12,6 @@ if (WINDOWS) elseif (DARWIN) target_link_libraries( ll::jsoncpp INTERFACE libjson_darwin_libmt.a ) elseif (LINUX) - target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-4.1.3_libmt.a ) + target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-11_libmt.a ) endif (WINDOWS) target_include_directories( ll::jsoncpp SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 2172b56da2..6e948c2186 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -1,4 +1,11 @@ # -*- cmake -*- + +include_guard() + +if( NOT LL_TESTS ) + return() +endif() + include(00-Common) include(LLTestCommand) include(GoogleMock) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index b36e970560..23f4115aeb 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -10,13 +10,11 @@ add_library( ll::SDL INTERFACE IMPORTED ) if (LINUX) #Must come first as use_system_binary can exit this file early - target_compile_definitions( ll::SDL INTERFACE LL_SDL=1) - - use_system_binary(SDL) - use_prebuilt_binary(SDL) - - target_include_directories( ll::SDL SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) - target_link_libraries( ll::SDL INTERFACE SDL directfb fusion direct X11) -endif (LINUX) + target_compile_definitions( ll::SDL INTERFACE LL_SDL_VERSION=2 LL_SDL) + #find_package(SDL2 REQUIRED) + #target_link_libraries( ll::SDL INTERFACE SDL2::SDL2 SDL2::SDL2main X11) + use_prebuilt_binary(SDL2) + target_link_libraries( ll::SDL INTERFACE SDL2 X11) +endif (LINUX) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index fd144d2b97..6983a5895a 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -12,7 +12,7 @@ use_prebuilt_binary(meshoptimizer) if (WINDOWS) target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib) elseif (LINUX) - target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.o) + target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a) elseif (DARWIN) target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a) endif (WINDOWS) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 8b70192efc..0eb9af6dcf 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -1,35 +1,43 @@ # -*- cmake -*- include(Prebuilt) include(FreeType) +include(GLIB) add_library( ll::uilibraries INTERFACE IMPORTED ) if (LINUX) - target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 ) + target_compile_definitions(ll::uilibraries INTERFACE LL_X11=1 ) if( USE_CONAN ) - target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk ) return() endif() - use_prebuilt_binary(gtk-atk-pango-glib) - + + find_package(FLTK REQUIRED ) + find_library(ND_FLTK_STATIC_LIBRARY libfltk.a PATH_SUFFIXES fltk ) + + if( NOT ND_FLTK_STATIC_LIBRARY ) + message(FATAL_ERROR "libfltk.a not found") + else() + message("libfltk.a found ${ND_FLTK_STATIC_LIBRARY}") + endif() + + target_include_directories( ll::uilibraries SYSTEM INTERFACE ${FLTK_INCLUDE_DIR}) + target_compile_definitions( ll::uilibraries INTERFACE LL_FLTK=1 ) target_link_libraries( ll::uilibraries INTERFACE - atk-1.0 - gdk-x11-2.0 - gdk_pixbuf-2.0 - Xinerama - glib-2.0 - gmodule-2.0 - gobject-2.0 - gthread-2.0 - gtk-x11-2.0 - pango-1.0 - pangoft2-1.0 - pangox-1.0 - pangoxft-1.0 + ${ND_FLTK_STATIC_LIBRARY} + Xrender + Xcursor + Xfixes + Xext + Xft Xinerama + ll::fontconfig ll::freetype - ) + ll::SDL + ll::glib + ll::gio + ) + endif (LINUX) if( WINDOWS ) target_link_libraries( ll::uilibraries INTERFACE @@ -51,4 +59,3 @@ endif() target_include_directories( ll::uilibraries SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) - diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index af1f16d04d..c037d657eb 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -127,8 +127,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH}) endif (DPKG_RESULT EQUAL 0) - include(ConfigurePkgConfig) - if (INSTALL_PROPRIETARY) # Only turn on headless if we can find osmesa libraries. include(FindPkgConfig) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 3e5a37b277..2cb11994fc 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -2,15 +2,10 @@ include(Prebuilt) if (LINUX) - #use_prebuilt_binary(libuuid) add_library( ll::fontconfig INTERFACE IMPORTED ) - if( NOT USE_CONAN ) - find_package(Fontconfig REQUIRED) - target_link_libraries( ll::fontconfig INTERFACE Fontconfig::Fontconfig ) - else() - target_link_libraries( ll::fontconfig INTERFACE CONAN_PKG::fontconfig ) - endif() + find_package(Fontconfig REQUIRED) + target_link_libraries( ll::fontconfig INTERFACE Fontconfig::Fontconfig ) endif (LINUX) if( NOT USE_CONAN ) -- cgit v1.2.3 From bbd6dfc21a1a6c07824fc81e0659a2c200581d3b Mon Sep 17 00:00:00 2001 From: AiraYumi Date: Tue, 9 Apr 2024 05:38:01 +0900 Subject: Some fixes to linux builds (#1144) * compile flag cleanup for linux * rollback indra/llcommon/llprofiler.h * use 3p fltk package * fix build gcc 13 (dangling-pointer) --- indra/cmake/00-Common.cmake | 2 +- indra/cmake/UI.cmake | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 486071a2df..419ebebe3b 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -198,7 +198,7 @@ if (LINUX OR DARWIN) list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor ) if(LINUX) - list(APPEND GCC_WARNINGS -Wno-maybe-uninitialized -Wno-misleading-indentation -Wno-stringop-truncation -Wno-unused-value ) + list(APPEND GCC_WARNINGS -Wno-maybe-uninitialized -Wno-dangling-pointer ) endif() add_compile_options(${GCC_WARNINGS}) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 0eb9af6dcf..0df62808e7 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -6,25 +6,15 @@ include(GLIB) add_library( ll::uilibraries INTERFACE IMPORTED ) if (LINUX) - target_compile_definitions(ll::uilibraries INTERFACE LL_X11=1 ) + use_prebuilt_binary(fltk) + target_compile_definitions(ll::uilibraries INTERFACE LL_FLTK=1 LL_X11=1 ) if( USE_CONAN ) return() endif() - find_package(FLTK REQUIRED ) - find_library(ND_FLTK_STATIC_LIBRARY libfltk.a PATH_SUFFIXES fltk ) - - if( NOT ND_FLTK_STATIC_LIBRARY ) - message(FATAL_ERROR "libfltk.a not found") - else() - message("libfltk.a found ${ND_FLTK_STATIC_LIBRARY}") - endif() - - target_include_directories( ll::uilibraries SYSTEM INTERFACE ${FLTK_INCLUDE_DIR}) - target_compile_definitions( ll::uilibraries INTERFACE LL_FLTK=1 ) target_link_libraries( ll::uilibraries INTERFACE - ${ND_FLTK_STATIC_LIBRARY} + fltk Xrender Xcursor Xfixes -- cgit v1.2.3 From 37392be4171303db08a4842b7882b4cb758a8f8d Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Tue, 9 Apr 2024 20:26:06 +0200 Subject: Update Linux media handling (#1146) * Enable CEF browser for Linux * Disable the update for Linux, we don't have that one right now * Update build_linux.yaml We need libpulse-dev for volume_catcher Linux * Add linux_volum_catcher* files * Enable OpenAL for Linux-ReleaseOS * Linux: Update OpenAL * Update SDL2 * Add libsndio-dev to the dependencies. * Update CEF to an official LL version * Remove dupe of emoji_shortcodes * Reording autobuild does because it can and wants to * Linux: Disable NDOF for the time being. After updating the ndof 3P needs to be rebuilt and we do not have a fresh one from LL yet. Forcefully undefine LIB_NDOF, it gets defined in the build variables no matter if it is safe to define. * Remove wrestling with mutliarch and LIBGL_DRIVERS_PATH * Remove tcmalloc snippet, tcmalloc is a very faint bad dream of the past * Putting out a warning this viewer ran on a x64 arch and then suggesting to install 32 bit compat packages makes no sense at all * CEF resources need to be in lib * It;'s okay to warn about missing plugins * Linux: CEF keyboard handling * Remove old gstreamer 0.10 implementation * Linux DSO loading always had been very peculiar due to macro magic. At least now it is peculiar shared magic with only one implementation. * Remove -fPIC. We get that one from LL_BUILD * /proc/cpuinfo is not reliable to detrmine the max CPU clock. Try to determine this by reading "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq". Only if this fails go back to /proc/cpuinfo * Cleanup * Cleanup common linker and compiler flags, make it more obvious which flags are for which OS/compiler * Switch to correct plugin file * Install libpulse-dev for volume catcher. * And the runner needs libsndio-dev as well. * check for runner.os=='linux'. matrix.os is the full name of the image (limux-large). --- indra/cmake/00-Common.cmake | 38 ++++++++++++++++---------------------- indra/cmake/CEFPlugin.cmake | 5 +++++ indra/cmake/LLWindow.cmake | 2 +- indra/cmake/NDOF.cmake | 4 ++-- 4 files changed, 24 insertions(+), 25 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 419ebebe3b..d46ebc4960 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -105,7 +105,6 @@ if (WINDOWS) endif() endif (WINDOWS) - if (LINUX) set( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE ) set( CMAKE_INSTALL_RPATH $ORIGIN $ORIGIN/../lib ) @@ -117,18 +116,14 @@ if (LINUX) set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXE} ) endif() - # EXTERNAL_TOS - # force this platform to accept TOS via external browser - - # LL_IGNORE_SIGCHLD - # don't catch SIGCHLD in our base application class for the viewer - some of - # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The - # viewer doesn't need to catch SIGCHLD anyway. + # LL_IGNORE_SIGCHLD + # don't catch SIGCHLD in our base application class for the viewer - some of + # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The + # viewer doesn't need to catch SIGCHLD anyway. add_compile_definitions( _REENTRANT _FORTIFY_SOURCE=2 - EXTERNAL_TOS APPID=secondlife LL_IGNORE_SIGCHLD ) @@ -146,22 +141,27 @@ if (LINUX) -Wno-pessimizing-move -Wno-stringop-overflow -Wno-stringop-truncation + -Wno-dangling-pointer -fvisibility=hidden ) add_link_options( - -Wl,--no-keep-memory - -Wl,--build-id + -Wl,--no-keep-memory + -Wl,--build-id + -Wl,--no-undefined ) + if (NOT GCC_DISABLE_FATAL_WARNINGS) + list(APPEND GCC_WARNINGS -Werror) + endif (NOT GCC_DISABLE_FATAL_WARNINGS) # this stops us requiring a really recent glibc at runtime add_compile_options(-fno-stack-protector) - # linking can be very memory-hungry, especially the final viewer link - set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") - set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") # ND: clang is a bit more picky than GCC, the latter seems to auto include -lstdc++ and -lm. The former not so and thus fails to link if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -lstdc++ -lm") + add_link_options( + -lstdc++ + -lm + ) endif() endif (LINUX) @@ -186,15 +186,9 @@ if (DARWIN) # required for clang-15/xcode-15 since our boost package still uses deprecated std::unary_function/binary_function # see https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#C++-Standard-Library add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) -endif (DARWIN) -if (LINUX OR DARWIN) set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs) - if (NOT GCC_DISABLE_FATAL_WARNINGS) - list(APPEND GCC_WARNINGS -Werror) - endif (NOT GCC_DISABLE_FATAL_WARNINGS) - list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor ) if(LINUX) @@ -203,4 +197,4 @@ if (LINUX OR DARWIN) add_compile_options(${GCC_WARNINGS}) add_compile_options(-m${ADDRESS_SIZE}) -endif (LINUX OR DARWIN) +endif () diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 9b77becf29..555d2aebbf 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -33,4 +33,9 @@ elseif (DARWIN) ) elseif (LINUX) + target_link_libraries( ll::cef INTERFACE + libdullahan.a + cef + cef_dll_wrapper.a + ) endif (WINDOWS) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 23f4115aeb..6c7b70461f 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -16,5 +16,5 @@ if (LINUX) #target_link_libraries( ll::SDL INTERFACE SDL2::SDL2 SDL2::SDL2main X11) use_prebuilt_binary(SDL2) - target_link_libraries( ll::SDL INTERFACE SDL2 X11) + target_link_libraries( ll::SDL INTERFACE SDL2 sndio X11) endif (LINUX) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index b88fbccf2a..db9c8b1780 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -19,6 +19,6 @@ if (NDOF) target_link_libraries( ll::ndof INTERFACE ndofdev) endif (WINDOWS) target_compile_definitions( ll::ndof INTERFACE LIB_NDOF=1) +else() + add_compile_options(-ULIB_NDOF) endif (NDOF) - - -- cgit v1.2.3 From 148f80f0779f42c1aa7d2f07c04a63507446662c Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Wed, 10 Apr 2024 19:54:10 -0700 Subject: Linux: build with clang, link with mold --- indra/cmake/00-Common.cmake | 54 ++++++++++++++++++++++++++++----------------- indra/cmake/Linker.cmake | 11 +++++++++ 2 files changed, 45 insertions(+), 20 deletions(-) create mode 100644 indra/cmake/Linker.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index d46ebc4960..21242a32be 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -15,6 +15,7 @@ include_guard() include(Variables) +include(Linker) # We go to some trouble to set LL_BUILD to the set of relevant compiler flags. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") @@ -127,23 +128,37 @@ if (LINUX) APPID=secondlife LL_IGNORE_SIGCHLD ) + add_compile_options( - -fexceptions - -fno-math-errno - -fno-strict-aliasing - -fsigned-char - -msse2 - -mfpmath=sse - -pthread - -Wno-parentheses - -Wno-deprecated - -Wno-c++20-compat - -Wno-pessimizing-move - -Wno-stringop-overflow - -Wno-stringop-truncation - -Wno-dangling-pointer - -fvisibility=hidden + -fexceptions + -fno-math-errno + -fno-strict-aliasing + -fsigned-char + -msse2 + -mfpmath=sse + -pthread + -fvisibility=hidden + ) + + set(GCC_CLANG_COMPATIBLE_WARNINGS + -Wno-parentheses + -Wno-deprecated + -Wno-c++20-compat + -Wno-pessimizing-move + ) + + set(CLANG_WARNINGS + ${GCC_CLANG_COMPATIBLE_WARNINGS} + # Put clang specific warning configuration here ) + + set(GCC_WARNINGS + ${GCC_CLANG_COMPATIBLE_WARNINGS} + -Wno-stringop-overflow + -Wno-stringop-truncation + -Wno-dangling-pointer + ) + add_link_options( -Wl,--no-keep-memory -Wl,--build-id @@ -156,12 +171,15 @@ if (LINUX) # this stops us requiring a really recent glibc at runtime add_compile_options(-fno-stack-protector) - # ND: clang is a bit more picky than GCC, the latter seems to auto include -lstdc++ and -lm. The former not so and thus fails to link if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # ND: clang is a bit more picky than GCC, the latter seems to auto include -lstdc++ and -lm. The former not so and thus fails to link add_link_options( -lstdc++ -lm ) + add_compile_options(${CLANG_WARNINGS}) + else() + add_compile_options(${GCC_WARNINGS}) endif() endif (LINUX) @@ -191,10 +209,6 @@ if (DARWIN) list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor ) - if(LINUX) - list(APPEND GCC_WARNINGS -Wno-maybe-uninitialized -Wno-dangling-pointer ) - endif() - add_compile_options(${GCC_WARNINGS}) add_compile_options(-m${ADDRESS_SIZE}) endif () diff --git a/indra/cmake/Linker.cmake b/indra/cmake/Linker.cmake new file mode 100644 index 0000000000..292aa25c57 --- /dev/null +++ b/indra/cmake/Linker.cmake @@ -0,0 +1,11 @@ +include_guard(GLOBAL) + +if (${LINK_WITH_MOLD}) + find_program(MOLD_BIN mold REQUIRED) + if(MOLD_BIN) + message(STATUS "Mold linker found: ${MOLD_BIN}. Enabling mold as active linker.") + add_link_options("-fuse-ld=${MOLD_BIN}") + else() + message(STATUS "Mold linker not found. Using default linker.") + endif() +endif() -- cgit v1.2.3 From 33c7b9701de1589e8e3875656a6bab4f8710e7a8 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 12 Apr 2024 14:15:01 +0200 Subject: Chore/cmake pretty up (#1205) * - Add an option to with ASAN - Fix GCC -Werror option. * - find_program should not set REQUIRED if per logic a fallback to ld.bfd is fine - cmake idiomatic is to test Variables without dereferencing them * Add -Wno-unknown-warning-option for clang or it will complain about some GCC only options ``` /home/runner/work/viewer/viewer/indra/llcommon/llsdutil.cpp:39:32: error: unknown warning group '-Wstringop-truncation', ignored [-Werror,-Wunknown-warning-option] #pragma GCC diagnostic ignored "-Wstringop-truncation" // It's actually okay what happens here ``` --- indra/cmake/00-Common.cmake | 14 ++++++++++++-- indra/cmake/Linker.cmake | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 21242a32be..d90a34bb6b 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -124,11 +124,20 @@ if (LINUX) add_compile_definitions( _REENTRANT - _FORTIFY_SOURCE=2 APPID=secondlife LL_IGNORE_SIGCHLD ) + if( ENABLE_ASAN ) + add_compile_options(-U_FORTIFY_SOURCE + -fsanitize=address + --param asan-stack=0 + ) + add_link_options(-fsanitize=address) + else() + add_compile_definitions( _FORTIFY_SOURCE=2 ) + endif() + add_compile_options( -fexceptions -fno-math-errno @@ -150,6 +159,7 @@ if (LINUX) set(CLANG_WARNINGS ${GCC_CLANG_COMPATIBLE_WARNINGS} # Put clang specific warning configuration here + -Wno-unknown-warning-option ) set(GCC_WARNINGS @@ -165,7 +175,7 @@ if (LINUX) -Wl,--no-undefined ) if (NOT GCC_DISABLE_FATAL_WARNINGS) - list(APPEND GCC_WARNINGS -Werror) + add_compile_options( -Werror ) endif (NOT GCC_DISABLE_FATAL_WARNINGS) # this stops us requiring a really recent glibc at runtime diff --git a/indra/cmake/Linker.cmake b/indra/cmake/Linker.cmake index 292aa25c57..8016842192 100644 --- a/indra/cmake/Linker.cmake +++ b/indra/cmake/Linker.cmake @@ -1,7 +1,7 @@ include_guard(GLOBAL) -if (${LINK_WITH_MOLD}) - find_program(MOLD_BIN mold REQUIRED) +if( LINK_WITH_MOLD ) + find_program(MOLD_BIN mold) if(MOLD_BIN) message(STATUS "Mold linker found: ${MOLD_BIN}. Enabling mold as active linker.") add_link_options("-fuse-ld=${MOLD_BIN}") -- cgit v1.2.3 From 2d4de107f8fc3714f75f73fc9293c87eaf0e5acb Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sun, 14 Apr 2024 15:14:23 +0200 Subject: Feature/linux gtk removal (#1225) * GTK remnants removal Remove old GTK code and wire up some missing fltk logic in llfilepicker This will leave linux_crash_logger as an empy stub which could be used as a skeleton in case crash logging gets implemented. Otherwise linux_crash_logger and what is left of it in some cmake files can be deleted. * Update SDL2 to latest version. This revealed openal has also a dependebcy on sndio. Consequently the dependency was moved to OPENMAL.cmake and canot be dropped. * Handle missing filetypes: FFSAVE_GLTF,FFLOAD_GLTF, FFLOAD_MATERIAL, FFLOAD_MATERIAL_TEXTURE --- indra/cmake/LLWindow.cmake | 2 +- indra/cmake/OPENAL.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 6c7b70461f..23f4115aeb 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -16,5 +16,5 @@ if (LINUX) #target_link_libraries( ll::SDL INTERFACE SDL2::SDL2 SDL2::SDL2main X11) use_prebuilt_binary(SDL2) - target_link_libraries( ll::SDL INTERFACE SDL2 sndio X11) + target_link_libraries( ll::SDL INTERFACE SDL2 X11) endif (LINUX) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index 0b6a7c2853..6a28846029 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -31,6 +31,7 @@ if (USE_OPENAL) target_link_libraries( ll::openal INTERFACE openal alut + sndio ) else() message(FATAL_ERROR "OpenAL is not available for this platform") -- cgit v1.2.3 From 8f0c41c2e5d5c66df5e975b743140112494c4a7a Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Mon, 15 Apr 2024 22:59:16 +0200 Subject: Chore/pragma gcc cleansweep (#1226) * Remove all GCC warning suppression pragmas. * For Linux just just raise(SIGSEGV) as the crash driver. This has a much higher chance of the compiler understanding out intent and figuring out we end the program here. * Remove -Wno-stringop-overflow and -Wno-stringop-truncation from GCC_WARNINGS. After calling raise(SIGSEGV) as the crash driver I saw no issue with those warnings anymore After removing thoses GCC pragmas there is also no need for clang -Wno-unknown-warning-option anymore. * Remove CMakePresets from this PR. * Remove Lindens from comments :) --- indra/cmake/00-Common.cmake | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index d90a34bb6b..2b6129590c 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -159,13 +159,10 @@ if (LINUX) set(CLANG_WARNINGS ${GCC_CLANG_COMPATIBLE_WARNINGS} # Put clang specific warning configuration here - -Wno-unknown-warning-option ) set(GCC_WARNINGS ${GCC_CLANG_COMPATIBLE_WARNINGS} - -Wno-stringop-overflow - -Wno-stringop-truncation -Wno-dangling-pointer ) -- cgit v1.2.3 From 1e5b77547fd4a70888ab24834bfdb634206cafc3 Mon Sep 17 00:00:00 2001 From: Maki Date: Wed, 17 Apr 2024 23:06:29 -0400 Subject: Use PipeWire for Linux volume catcher --- indra/cmake/FindPipeWire.cmake | 100 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 indra/cmake/FindPipeWire.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/FindPipeWire.cmake b/indra/cmake/FindPipeWire.cmake new file mode 100644 index 0000000000..868acf5ec1 --- /dev/null +++ b/indra/cmake/FindPipeWire.cmake @@ -0,0 +1,100 @@ +# cmake-format: off +# .rst: FindPipeWire +# ------- +# +# Try to find PipeWire on a Unix system. +# +# This will define the following variables: +# +# ``PIPEWIRE_FOUND`` True if (the requested version of) PipeWire is available +# ``PIPEWIRE_VERSION`` The version of PipeWire ``PIPEWIRE_LIBRARIES`` This can +# be passed to target_link_libraries() instead of the ``PipeWire::PipeWire`` +# target ``PIPEWIRE_INCLUDE_DIRS`` This should be passed to +# target_include_directories() if the target is not used for linking +# ``PIPEWIRE_COMPILE_FLAGS`` This should be passed to target_compile_options() +# if the target is not used for linking +# +# If ``PIPEWIRE_FOUND`` is TRUE, it will also define the following imported +# target: +# +# ``PipeWire::PipeWire`` The PipeWire library +# +# In general we recommend using the imported target, as it is easier to use. +# Bear in mind, however, that if the target is in the link interface of an +# exported library, it must be made available by the package config file. + +# ============================================================================= +# Copyright 2014 Alex Merry Copyright 2014 Martin Gräßlin +# Copyright 2018-2020 Jan Grulich +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the copyright notice, this list +# of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright notice, this +# list of conditions and the following disclaimer in the documentation and/or +# other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# ============================================================================= +# cmake-format: on + +# Use pkg-config to get the directories and then use these values in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig QUIET) + +pkg_search_module(PKG_PIPEWIRE QUIET libpipewire-0.3) +pkg_search_module(PKG_SPA QUIET libspa-0.2) + +set(PIPEWIRE_COMPILE_FLAGS "${PKG_PIPEWIRE_CFLAGS}" "${PKG_SPA_CFLAGS}") +set(PIPEWIRE_VERSION "${PKG_PIPEWIRE_VERSION}") + +find_path( + PIPEWIRE_INCLUDE_DIRS + NAMES pipewire/pipewire.h + HINTS ${PKG_PIPEWIRE_INCLUDE_DIRS} ${PKG_PIPEWIRE_INCLUDE_DIRS}/pipewire-0.3) + +find_path( + SPA_INCLUDE_DIRS + NAMES spa/param/props.h + HINTS ${PKG_SPA_INCLUDE_DIRS} ${PKG_SPA_INCLUDE_DIRS}/spa-0.2) + +find_library( + PIPEWIRE_LIBRARIES + NAMES pipewire-0.3 + HINTS ${PKG_PIPEWIRE_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + PipeWire + FOUND_VAR PIPEWIRE_FOUND + REQUIRED_VARS PIPEWIRE_LIBRARIES PIPEWIRE_INCLUDE_DIRS SPA_INCLUDE_DIRS + VERSION_VAR PIPEWIRE_VERSION) + +if(PIPEWIRE_FOUND AND NOT TARGET PipeWire::PipeWire) + add_library(PipeWire::PipeWire UNKNOWN IMPORTED) + set_target_properties( + PipeWire::PipeWire + PROPERTIES IMPORTED_LOCATION "${PIPEWIRE_LIBRARIES}" + INTERFACE_COMPILE_OPTIONS "${PIPEWIRE_COMPILE_FLAGS}" + INTERFACE_INCLUDE_DIRECTORIES "${PIPEWIRE_INCLUDE_DIRS};${SPA_INCLUDE_DIRS}") +endif() + +mark_as_advanced(PIPEWIRE_LIBRARIES PIPEWIRE_INCLUDE_DIRS) + +include(FeatureSummary) +set_package_properties( + PipeWire PROPERTIES + URL "https://www.pipewire.org" + DESCRIPTION "PipeWire - multimedia processing") -- cgit v1.2.3 From 2ab17fa3f991a71cdb83d6dba8e345e14f11514c Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 18 Apr 2024 17:59:56 +0200 Subject: Update open_libndofdev and openal to latest versions. - With the updated openal the dependency on sndio can be dropped - The updated libndofdev is compiled against the correct version of SDL2 and thus NDOF can be enabled again --- indra/cmake/OPENAL.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index 6a28846029..0b6a7c2853 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -31,7 +31,6 @@ if (USE_OPENAL) target_link_libraries( ll::openal INTERFACE openal alut - sndio ) else() message(FATAL_ERROR "OpenAL is not available for this platform") -- cgit v1.2.3 From 1ebf006b73c06d037e3d3ae4393136082195096d Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 27 Mar 2024 19:51:59 -0400 Subject: Remove dead googlemock dependency and related setup code --- indra/cmake/CMakeLists.txt | 1 - indra/cmake/GoogleMock.cmake | 32 -------------------------------- indra/cmake/LLAddBuildTest.cmake | 7 ------- 3 files changed, 40 deletions(-) delete mode 100644 indra/cmake/GoogleMock.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index e1507bf6a0..df968144ed 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -26,7 +26,6 @@ set(cmake_SOURCE_FILES FreeType.cmake GLEXT.cmake GLH.cmake - GoogleMock.cmake Havok.cmake Hunspell.cmake JsonCpp.cmake diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake deleted file mode 100644 index c3d195c37b..0000000000 --- a/indra/cmake/GoogleMock.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) -include(Linking) - -include_guard() - -add_library( ll::googlemock INTERFACE IMPORTED ) -if(USE_CONAN) - target_link_libraries( ll::googlemock INTERFACE CONAN_PKG::gtest ) - - #Not very nice, but for the moment we need this for tut.hpp - target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) - return() -endif() - -use_prebuilt_binary(googlemock) - -target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) - -if (LINUX) - # VWR-24366: gmock is underlinked, it needs gtest. - target_link_libraries( ll::googlemock INTERFACE gmock gtest) -elseif(WINDOWS) - target_link_libraries( ll::googlemock INTERFACE gmock) - target_include_directories( ll::googlemock SYSTEM INTERFACE - ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_DIR}/include/gmock) -elseif(DARWIN) - target_link_libraries( ll::googlemock INTERFACE gmock gtest) -endif(LINUX) - - diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 6e948c2186..5d96a4398f 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -8,7 +8,6 @@ endif() include(00-Common) include(LLTestCommand) -include(GoogleMock) include(bugsplat) include(Tut) @@ -26,10 +25,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) # # More info and examples at: https://wiki.secondlife.com/wiki/How_to_add_unit_tests_to_indra_code - # This here looks weird, but is needed. It will inject GoogleMock into projects that forgot to include `this` (LLAddBuildTest.cmake) - # But through some other means have access to this macro - include(GoogleMock) - if(LL_TEST_VERBOSE) message("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}") endif() @@ -48,7 +43,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) set(alltest_LIBRARIES llcommon - ll::googlemock ) if(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! @@ -211,7 +205,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST set(libraries ${library_dependencies} - ll::googlemock ) # Add test executable build target -- cgit v1.2.3 From c10e785e338aa63165c614d926ce882f4f116716 Mon Sep 17 00:00:00 2001 From: AiraYumi Date: Tue, 11 Jun 2024 14:06:54 +0900 Subject: Replace LL_X11 and LL_FLTK to LL_LINUX --- indra/cmake/UI.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 0df62808e7..7ae8d1c883 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -7,7 +7,6 @@ add_library( ll::uilibraries INTERFACE IMPORTED ) if (LINUX) use_prebuilt_binary(fltk) - target_compile_definitions(ll::uilibraries INTERFACE LL_FLTK=1 LL_X11=1 ) if( USE_CONAN ) return() -- cgit v1.2.3 From c4fc76efefd12c7cb1224dc8a748da2958f4a7f0 Mon Sep 17 00:00:00 2001 From: AiraYumi Date: Thu, 13 Jun 2024 10:39:05 +0900 Subject: Revert "Replace LL_X11 and LL_FLTK to LL_LINUX" --- indra/cmake/UI.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 7ae8d1c883..0df62808e7 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -7,6 +7,7 @@ add_library( ll::uilibraries INTERFACE IMPORTED ) if (LINUX) use_prebuilt_binary(fltk) + target_compile_definitions(ll::uilibraries INTERFACE LL_FLTK=1 LL_X11=1 ) if( USE_CONAN ) return() -- cgit v1.2.3 From 9c4b6a04166c0053b147f9064056a50644be4d6b Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 3 Aug 2024 14:20:17 +0200 Subject: Remove -wno-dangling-pointer, compiling with GCC 13.3, 12, 11 and clang did not yield such a warning. Furthermore this warning should not just be disabled but rather dealt with when it comes up --- indra/cmake/00-Common.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 25841d9d78..4ae9377500 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -175,7 +175,6 @@ if (LINUX) set(GCC_WARNINGS ${GCC_CLANG_COMPATIBLE_WARNINGS} - -Wno-dangling-pointer ) add_link_options( -- cgit v1.2.3 From fd15b4309b126fd5f83f2091c060a6043e18fdbf Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Tue, 6 Aug 2024 15:20:05 +0200 Subject: Ignore VmallocTotal as it's fixed, huge Number. (#2200) Not ignoring it will cause a lot of log spam due to conversion/parse errors. --- indra/cmake/Linking.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 0ab30d0800..e6ce902b61 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -7,6 +7,7 @@ set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib) set(ARCH_PREBUILT_DIRS_PLUGINS ${AUTOBUILD_INSTALL_DIR}/plugins) set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release) set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug) + if (WINDOWS OR DARWIN ) # Kludge for older cmake versions, 3.20+ is needed to use a genex in add_custom_command( OUTPUT ... ) # Using this will work okay-ish, as Debug is not supported anyway. But for property multi config and also -- cgit v1.2.3 From 143168f9d95afeac2058efa4f54435a654c770f8 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 6 Aug 2024 16:58:06 +0300 Subject: Force ReleaseOS builds on Linux --- indra/cmake/Copy3rdPartyLibs.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index bed365fdda..4626e9d0d9 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -226,7 +226,6 @@ elseif(LINUX) list( APPEND release_files libapr-1.so.0 libaprutil-1.so.0 - libhunspell-1.3.so.0.0.0 ) endif() -- cgit v1.2.3 From 03d7f2b84daf9ab991de6cad7d6149abda1ef716 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Aug 2024 21:16:56 -0400 Subject: Ditch trailing spaces. --- indra/cmake/run_build_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index ef4d712254..312d791d67 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -150,7 +150,7 @@ def translate_rc(rc): """ if rc is None: return "still running" - + if rc >= 0: return "terminated with rc %s" % rc -- cgit v1.2.3 From 0a617904f98ab5960379099822e4891a08137e68 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 17 Sep 2024 18:14:22 -0500 Subject: #2590 Fix for horrible FPS on Intel Mac (#2591) * Work around for GHA mac runners not playing nice with Tracy * Delay VBO deletion for a few frames * Enable multithreaded GL driver and multithreaded media textures on Apple silicon --- indra/cmake/Tracy.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake index ec7178c5a0..a7eac2711f 100644 --- a/indra/cmake/Tracy.cmake +++ b/indra/cmake/Tracy.cmake @@ -31,6 +31,11 @@ if (USE_TRACY) target_compile_definitions(ll::tracy INTERFACE -DTRACY_NO_BROADCAST=1 -DTRACY_ONLY_LOCALHOST=1) endif () + # GHA runners don't always provide invariant TSC support, but always build with LL_TESTS enabled + if (DARWIN AND LL_TESTS) + target_compile_definitions(ll::tracy INTERFACE -DTRACY_TIMER_FALLBACK=1) + endif () + # See: indra/llcommon/llprofiler.h add_compile_definitions(LL_PROFILER_CONFIGURATION=3) endif (USE_TRACY) -- cgit v1.2.3 From 0b7548c6b69f8259aae987c479a85a9d0fd04d89 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Mon, 23 Sep 2024 12:45:12 -0700 Subject: Turn off tracy on linux to unbreak the build. --- indra/cmake/Tracy.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake index a7eac2711f..9eee9eb57f 100644 --- a/indra/cmake/Tracy.cmake +++ b/indra/cmake/Tracy.cmake @@ -12,6 +12,11 @@ else() option(USE_TRACY "Use Tracy profiler." OFF) endif() +if (LINUX) + # tracy currently conflicts with llcommon/stdtypes.h on linux. keep it disabled until we fix it + set(USE_TRACY OFF) +endif(LINUX) + if (USE_TRACY) option(USE_TRACY_ON_DEMAND "Use on-demand Tracy profiling." ON) option(USE_TRACY_LOCAL_ONLY "Disallow remote Tracy profiling." OFF) -- cgit v1.2.3