2022-02-08 01:22:51 +00:00
|
|
|
# libopenmpt detection
|
|
|
|
find_library(LIBOPENMPT NAMES openmpt)
|
2022-02-11 02:34:07 +00:00
|
|
|
if (NOT "${LIBOPENMPT}" STREQUAL "LIBOPENMPT-NOTFOUND")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/libopenmptdecoder" "openmptdecoder")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# 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()
|
|
|
|
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/alsaout" "alsaout")
|
|
|
|
add_plugin("src/plugins/pulseout" "pulseout")
|
2022-02-08 01:22:51 +00:00
|
|
|
if (${ENABLE_PIPEWIRE} MATCHES "true")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/pipewireout" "pipewireout")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif()
|
|
|
|
if (${ENABLE_MPRIS} MATCHES "true")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/mpris" "mpris")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif()
|
|
|
|
if (${ENABLE_SNDIO} MATCHES "true")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/sndioout" "sndioout")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif()
|
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
|
|
|
add_subdirectory(src/plugins/sndioout)
|
|
|
|
if (${ENABLE_PULSEAUDIO} MATCHES "true")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/pulseout" "pulseout")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif()
|
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
|
|
add_subdirectory(src/plugins/sndioout)
|
|
|
|
if (${ENABLE_PULSEAUDIO} MATCHES "true")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/pulseout" "pulseout")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif()
|
|
|
|
if (${ENABLE_ALSA} MATCHES "true")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/alsaout" "alsaout")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif()
|
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
2022-02-11 03:43:48 +00:00
|
|
|
add_plugin("src/plugins/coreaudioout" "coreaudioout")
|
|
|
|
add_plugin("src/plugins/macosmediakeys" "macosmediakeys")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif()
|