summaryrefslogtreecommitdiff
path: root/indra/cmake/00-Common.cmake
diff options
context:
space:
mode:
authorNicky Dasmijn <nicky.dasmijn@posteo.nl>2024-04-09 20:26:06 +0200
committerGitHub <noreply@github.com>2024-04-09 21:26:06 +0300
commit37392be4171303db08a4842b7882b4cb758a8f8d (patch)
treeb93a6e27f64732395f92421aeec0efc8622c133c /indra/cmake/00-Common.cmake
parent6b4b33cc129e9482342c9280ae79c9c5ce427ef1 (diff)
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).
Diffstat (limited to 'indra/cmake/00-Common.cmake')
-rw-r--r--indra/cmake/00-Common.cmake38
1 files changed, 16 insertions, 22 deletions
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 ()