diff --git a/CMakeLists.txt b/CMakeLists.txt index 22a60eab5..d91789a73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)