From fea06d9674bbe0a060c7d6c6cdad18353e7fa594 Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Tue, 20 Apr 2021 00:55:14 +0200 Subject: [PATCH] Use pkg-config for pipewire library in cmake (#432) --- src/plugins/pipewireout/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/pipewireout/CMakeLists.txt b/src/plugins/pipewireout/CMakeLists.txt index 7c24320d9..233adab24 100644 --- a/src/plugins/pipewireout/CMakeLists.txt +++ b/src/plugins/pipewireout/CMakeLists.txt @@ -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)