2017-01-26 16:17:02 +00:00
|
|
|
#
|
|
|
|
# Check libraries
|
|
|
|
#
|
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
if (BUILD_DOC)
|
|
|
|
find_program(BIN_SPHINX "${SPHINX_BUILD}")
|
2017-01-26 16:17:02 +00:00
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
if (NOT BIN_SPHINX)
|
|
|
|
message(FATAL_ERROR "sphinx-build executable '${SPHINX_BUILD}' not found.")
|
|
|
|
endif()
|
2019-06-15 15:12:57 +00:00
|
|
|
endif()
|
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
if (BUILD_LIBPOLY)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
find_package(CairoFC REQUIRED)
|
2019-06-15 15:12:57 +00:00
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
if (ENABLE_ALSA)
|
|
|
|
find_package(ALSA REQUIRED)
|
|
|
|
set(ALSA_VERSION ${ALSA_VERSION_STRING})
|
|
|
|
endif()
|
2019-06-15 15:12:57 +00:00
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
if (ENABLE_CURL)
|
|
|
|
find_package(CURL REQUIRED)
|
|
|
|
set(CURL_VERSION ${CURL_VERSION_STRING})
|
2019-06-15 15:12:57 +00:00
|
|
|
endif()
|
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
if (ENABLE_MPD)
|
|
|
|
find_package(LibMPDClient REQUIRED)
|
|
|
|
set(MPD_VERSION ${LibMPDClient_VERSION})
|
|
|
|
endif()
|
2019-06-15 15:12:57 +00:00
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
if (ENABLE_NETWORK)
|
|
|
|
if(WITH_LIBNL)
|
|
|
|
find_package(LibNlGenl3 REQUIRED)
|
|
|
|
set(NETWORK_LIBRARY_VERSION ${LibNlGenl3_VERSION})
|
|
|
|
else()
|
|
|
|
find_package(Libiw REQUIRED)
|
|
|
|
endif()
|
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
if (ENABLE_PULSEAUDIO)
|
|
|
|
find_package(LibPulse REQUIRED)
|
|
|
|
set(PULSEAUDIO_VERSION ${LibPulse_VERSION})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# xcomposite is required
|
|
|
|
list(APPEND XORG_EXTENSIONS COMPOSITE)
|
|
|
|
if (WITH_XKB)
|
|
|
|
list(APPEND XORG_EXTENSIONS XKB)
|
|
|
|
endif()
|
|
|
|
if (WITH_XCURSOR)
|
|
|
|
list(APPEND XORG_EXTENSIONS CURSOR)
|
|
|
|
endif()
|
|
|
|
if (WITH_XRM)
|
|
|
|
list(APPEND XORG_EXTENSIONS XRM)
|
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
# Set min xrandr version required
|
|
|
|
if (WITH_XRANDR_MONITORS)
|
|
|
|
set(XRANDR_VERSION "1.12")
|
|
|
|
else ()
|
|
|
|
set(XRANDR_VERSION "")
|
|
|
|
endif()
|
2018-03-21 22:35:10 +00:00
|
|
|
|
2020-12-22 02:43:06 +00:00
|
|
|
# Randr is required
|
|
|
|
find_package(Xcb ${XRANDR_VERSION} REQUIRED COMPONENTS RANDR)
|
|
|
|
find_package(Xcb REQUIRED COMPONENTS ${XORG_EXTENSIONS})
|
|
|
|
|
|
|
|
# FreeBSD Support
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
|
|
|
find_package(LibInotify REQUIRED)
|
|
|
|
endif()
|
2018-03-21 22:35:10 +00:00
|
|
|
endif()
|