summaryrefslogtreecommitdiff
path: root/indra/media_plugins/cef/CMakeLists.txt
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-06-20 16:16:37 +0800
committerErik Kundiman <erik@megapahit.org>2024-06-20 20:52:45 +0800
commitad5dec92bcb7d11e6a48b6ec6a220a49de985351 (patch)
tree3870c4c7f1c9521c6ad40d1cfe1b1d8fc39882ef /indra/media_plugins/cef/CMakeLists.txt
parent16299d3a3631e4c42367cf40410ad6995e585384 (diff)
parenta65bc46b138b89200586b29fe729cbc7b0f0c8c4 (diff)
Merge remote-tracking branch 'secondlife/release/maint-b' into maint-b
Diffstat (limited to 'indra/media_plugins/cef/CMakeLists.txt')
-rw-r--r--indra/media_plugins/cef/CMakeLists.txt44
1 files changed, 31 insertions, 13 deletions
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 15b2d71923..96c066ca6d 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -10,18 +10,10 @@ include(Linking)
include(PluginAPI)
include(CEFPlugin)
-
+include(GLIB)
### media_plugin_cef
-if(NOT ADDRESS_SIZE EQUAL 32)
- if(WINDOWS)
- ##add_definitions(/FIXED:NO)
- else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
- add_definitions(-fPIC)
- endif(WINDOWS)
-endif(NOT ADDRESS_SIZE EQUAL 32)
-
set(media_plugin_cef_SOURCE_FILES
media_plugin_cef.cpp
)
@@ -32,11 +24,36 @@ set(media_plugin_cef_HEADER_FILES
# Select which VolumeCatcher implementation to use
if (LINUX)
-# message(FATAL_ERROR "CEF plugin has been enabled for a Linux compile.\n"
-# " Please create a volume_catcher implementation for this platform.")
- list(APPEND media_plugin_cef_SOURCE_FILES mac_volume_catcher_null.cpp)
+ foreach( PULSE_FILE pulse/introspect.h pulse/context.h pulse/subscribe.h pulse/glib-mainloop.h )
+ find_path( PULSE_FILE_${PULSE_FILE}_FOUND ${PULSE_FILE} NO_CACHE)
+ if( NOT PULSE_FILE_${PULSE_FILE}_FOUND )
+ message( "Looking for ${PULSE_FILE} ... not found")
+ message( FATAL_ERROR "Pulse header not found" )
+ else()
+ message( "Looking for ${PULSE_FILE} ... found")
+ endif()
+ endforeach()
+
+ include(FindPipeWire)
+ include_directories(SYSTEM ${PIPEWIRE_INCLUDE_DIRS} ${SPA_INCLUDE_DIRS})
+
+ message( "Building with Linux volume catcher for PipeWire and PulseAudio" )
+
+ list(APPEND media_plugin_cef_HEADER_FILES
+ linux/volume_catcher_linux.h
+ )
+
+ set(LINUX_VOLUME_CATCHER
+ linux/volume_catcher_linux.cpp
+ linux/volume_catcher_pulseaudio.cpp
+ linux/volume_catcher_pipewire.cpp
+ )
+
+ list(APPEND media_plugin_cef_SOURCE_FILES ${LINUX_VOLUME_CATCHER})
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../../lib'")
+ list(APPEND media_plugin_cef_LINK_LIBRARIES llwindow )
elseif (DARWIN)
- list(APPEND media_plugin_cef_SOURCE_FILES mac_volume_catcher_null.cpp)
+ list(APPEND media_plugin_cef_SOURCE_FILES volume_catcher_null.cpp)
find_library(CORESERVICES_LIBRARY CoreServices)
find_library(AUDIOUNIT_LIBRARY AudioUnit)
set( media_plugin_cef_LINK_LIBRARIES
@@ -61,6 +78,7 @@ add_library(media_plugin_cef
target_link_libraries(media_plugin_cef
media_plugin_base
ll::cef
+ ll::glib_headers
)
if (WINDOWS)