mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
mpris: respect USE_BASU for include
In file included from src/plugins/mpris/mpris.cpp:2: src/plugins/mpris/mpris.h:11:14: fatal error: 'systemd/sd-bus.h' file not found #include <systemd/sd-bus.h> ^~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
2ee3970919
commit
a9b08fab3b
@ -4,10 +4,13 @@ set (mpris_SOURCES
|
||||
|
||||
if (USE_ELOGIND)
|
||||
set(SDBUS "libelogind >= 239.3")
|
||||
set(SDBUS_HEADER "<elogind/sd-bus.h>")
|
||||
elseif (USE_BASU)
|
||||
set(SDBUS "basu")
|
||||
set(SDBUS_HEADER "<basu/sd-bus.h>")
|
||||
else()
|
||||
set(SDBUS "libsystemd")
|
||||
set(SDBUS_HEADER "<systemd/sd-bus.h>")
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig)
|
||||
@ -18,5 +21,6 @@ if (NOT DEFINED SDBUS_LINK_LIBRARIES)
|
||||
else()
|
||||
message(STATUS "[mpris] plugin enabled. using " ${SDBUS_LINK_LIBRARIES})
|
||||
add_library(mpris SHARED ${mpris_SOURCES})
|
||||
target_compile_definitions(mpris PUBLIC SDBUS_HEADER=${SDBUS_HEADER})
|
||||
target_link_libraries(mpris PkgConfig::SDBUS)
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
#include <systemd/sd-bus.h>
|
||||
#include SDBUS_HEADER
|
||||
}
|
||||
|
||||
extern const sd_bus_vtable musikcube_mp_table[];
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <memory>
|
||||
|
||||
extern "C" {
|
||||
#include <systemd/sd-bus.h>
|
||||
#include SDBUS_HEADER
|
||||
}
|
||||
|
||||
using namespace musik::core::sdk;
|
||||
|
Loading…
Reference in New Issue
Block a user