mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibMedia+Ladybird: Use pkg_check_modules to find pulseaudio
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
2106617f5b
commit
3ecf6de652
Notes:
github-actions[bot]
2024-10-03 00:23:51 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/3ecf6de6529 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1608
5 changed files with 12 additions and 12 deletions
|
@ -1,4 +1,5 @@
|
|||
include(fontconfig)
|
||||
include(pulseaudio)
|
||||
|
||||
set(WEBCONTENT_SOURCE_DIR ${LADYBIRD_SOURCE_DIR}/Userland/Services/WebContent/)
|
||||
|
||||
|
@ -36,10 +37,6 @@ target_include_directories(webcontentservice PUBLIC $<BUILD_INTERFACE:${CMAKE_CU
|
|||
|
||||
target_link_libraries(webcontentservice PUBLIC LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibMedia LibWeb LibWebSocket LibRequests LibWebView LibImageDecoderClient)
|
||||
|
||||
if (HAVE_PULSEAUDIO)
|
||||
target_compile_definitions(webcontentservice PUBLIC HAVE_PULSEAUDIO=1)
|
||||
endif()
|
||||
|
||||
if (HAS_FONTCONFIG)
|
||||
target_link_libraries(webcontentservice PRIVATE Fontconfig::Fontconfig)
|
||||
endif()
|
||||
|
|
8
Meta/CMake/pulseaudio.cmake
Normal file
8
Meta/CMake/pulseaudio.cmake
Normal file
|
@ -0,0 +1,8 @@
|
|||
include_guard()
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PULSEAUDIO IMPORTED_TARGET libpulse)
|
||||
|
||||
if (PULSEAUDIO_FOUND)
|
||||
set(HAVE_PULSEAUDIO ON CACHE BOOL "" FORCE)
|
||||
endif()
|
|
@ -132,8 +132,6 @@ if (ENABLE_FUZZERS)
|
|||
add_cxx_compile_options(-fno-omit-frame-pointer)
|
||||
endif()
|
||||
|
||||
CHECK_INCLUDE_FILE(pulse/pulseaudio.h HAVE_PULSEAUDIO)
|
||||
|
||||
add_library(JSClangPlugin INTERFACE)
|
||||
add_library(GenericClangPlugin INTERFACE)
|
||||
|
||||
|
|
|
@ -10,7 +10,3 @@ set(TEST_SOURCES
|
|||
foreach(source IN LISTS TEST_SOURCES)
|
||||
lagom_test("${source}" LibMedia LIBS LibMedia LibFileSystem WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endforeach()
|
||||
|
||||
if (HAVE_PULSEAUDIO)
|
||||
target_compile_definitions(TestPlaybackStream PRIVATE HAVE_PULSEAUDIO=1)
|
||||
endif()
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
include(ffmpeg)
|
||||
include(pulseaudio)
|
||||
|
||||
set(SOURCES
|
||||
Audio/Loader.cpp
|
||||
|
@ -33,8 +34,8 @@ if (HAVE_PULSEAUDIO)
|
|||
Audio/PlaybackStreamPulseAudio.cpp
|
||||
Audio/PulseAudioWrappers.cpp
|
||||
)
|
||||
target_link_libraries(LibMedia PRIVATE pulse)
|
||||
target_compile_definitions(LibMedia PRIVATE HAVE_PULSEAUDIO=1)
|
||||
target_link_libraries(LibMedia PRIVATE PkgConfig::PULSEAUDIO)
|
||||
target_compile_definitions(LibMedia PUBLIC HAVE_PULSEAUDIO=1)
|
||||
elseif (APPLE AND NOT IOS)
|
||||
target_sources(LibMedia PRIVATE Audio/PlaybackStreamAudioUnit.cpp)
|
||||
|
||||
|
|
Loading…
Reference in a new issue