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