polybar-dwm/cmake/03-libs.cmake

64 lines
1.3 KiB
CMake
Raw Normal View History

2017-01-26 16:17:02 +00:00
#
# Check libraries
#
find_package(Threads REQUIRED)
find_package(CairoFC REQUIRED)
2017-01-26 16:17:02 +00:00
if (ENABLE_ALSA)
find_package(ALSA REQUIRED)
set(ALSA_VERSION ${ALSA_VERSION_STRING})
endif()
if (ENABLE_CURL)
find_package(CURL REQUIRED)
set(CURL_VERSION ${CURL_VERSION_STRING})
endif()
if (ENABLE_MPD)
find_package(LibMPDClient REQUIRED)
set(MPD_VERSION ${LibMPDClient_VERSION})
endif()
if (ENABLE_NETWORK)
if(WITH_LIBNL)
find_package(LibNlGenl3 REQUIRED)
set(NETWORK_LIBRARY_VERSION ${LibNlGenl3_VERSION})
else()
find_package(Libiw REQUIRED)
endif()
endif()
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
# Set min xrandr version required
if (WITH_XRANDR_MONITORS)
set(XRANDR_VERSION "1.12")
else ()
set(XRANDR_VERSION "")
endif()
2017-01-26 16:17:02 +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")
find_package(LibInotify REQUIRED)
2018-03-21 22:35:10 +00:00
endif()