Use pkg-config for pipewire library in cmake (#432)

This commit is contained in:
eater 2021-04-20 00:55:14 +02:00 committed by GitHub
parent 132a8b7f88
commit fea06d9674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,10 +7,8 @@ ensure_library_exists(pipewire-0.3)
message(STATUS "[pipewireout] plugin enabled")
include_directories("/usr/include/spa-0.2")
include_directories("/usr/local/include/spa-0.2")
include_directories("/usr/include/pipewire-0.3")
include_directories("/usr/local/include/pipewire-0.3")
find_package(PkgConfig)
pkg_check_modules(PIPEWIRE REQUIRED IMPORTED_TARGET libpipewire-0.3)
add_library(pipewireout SHARED ${pipewireout_SOURCES})
target_link_libraries(pipewireout ${musikcube_LINK_LIBS} pipewire-0.3)
target_link_libraries(pipewireout ${musikcube_LINK_LIBS} PkgConfig::PIPEWIRE)