Detect libsystemd and automatically enable the MPRIS plugin if it

exists.
This commit is contained in:
casey langen 2019-10-19 21:11:49 -07:00
parent 0d15042483
commit 918ff9f30b

View File

@ -153,6 +153,22 @@ endif()
# end gross taglib detection stuff
# systemd / MPRIS detection
if (NOT ENABLE_MPRIS MATCHES "false")
find_library(LIB_SYSTEMD NAMES systemd)
if (NOT LIB_SYSTEMD MATCHES "LIB_SYSTEMD-NOTFOUND")
message(STATUS "[mpris] systemd found at " ${LIB_SYSTEMD})
message(STATUS "[mpris] setting ENABLE_MPRIS=true")
set(ENABLE_MPRIS "true")
else()
message(STATUS "[mpris] systemd *not* found. MPRIS plugin not enabled")
set(ENABLE_MPRIS "false")
endif()
endif()
#end systemd / MPRIS detection
add_dependencies(musikcube musikcore taglibreader nullout server httpdatastream stockencoders)
add_dependencies(musikcubed musikcube)