musikcube/.cmake/AddOsSpecificPlugins.cmake

48 lines
1.7 KiB
CMake
Raw Normal View History

# libopenmpt detection
find_library(LIBOPENMPT NAMES openmpt)
if (NOT "${LIBOPENMPT}" STREQUAL "LIBOPENMPT-NOTFOUND")
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/libopenmptdecoder" "openmptdecoder")
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")
if (${ENABLE_PIPEWIRE} MATCHES "true")
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/pipewireout" "pipewireout")
endif()
if (${ENABLE_MPRIS} MATCHES "true")
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/mpris" "mpris")
endif()
if (${ENABLE_SNDIO} MATCHES "true")
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/sndioout" "sndioout")
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")
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")
endif()
if (${ENABLE_ALSA} MATCHES "true")
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/alsaout" "alsaout")
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")
endif()