fix(cmake): Properly check xcb-xrm

The default value of WITH_XRM was never calculated because
the "IF NOT DEFINED" check was done after the call to option()

Refs #381
This commit is contained in:
Michael Carlberg 2017-01-26 12:59:12 +01:00
parent 162e77793a
commit b97e4c56c5
1 changed files with 9 additions and 5 deletions

View File

@ -43,6 +43,15 @@ endif()
# }}}
# Default value for: WITH_XRM {{{
if(NOT DEFINED WITH_XRM)
pkg_check_modules(XRM QUIET xcb-xrm)
set(WITH_XRM ${XRM_FOUND} CACHE BOOL "Enable xcb-xrm support")
endif()
# }}}
# Define build options {{{
option(CXXLIB_CLANG "Link against libc++" OFF)
@ -74,11 +83,6 @@ option(WITH_XCOMPOSITE "xcb-composite support" OFF)
option(WITH_XKB "xcb-xkb support" ON)
option(WITH_XRM "xcb-xrm support" ON)
if(NOT DEFINED WITH_XRM)
pkg_check_modules(XRM QUIET xcb-xrm)
set(WITH_XRM ${XRM_FOUND} CACHE BOOL "Enable xcb-xrm support")
endif()
if(NOT DEFINED ENABLE_XRANDR_MONITORS)
pkg_check_modules(XRANDR QUIET xrandr>=1.5.0 randrproto>=1.5.0 xcb-proto>=1.12)
if(NOT XRANDR_FOUND)