From b97e4c56c5900b9ea216b9da6d05835c2c58ab24 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Thu, 26 Jan 2017 12:59:12 +0100 Subject: [PATCH] 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 --- cmake/build/options.cmake | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cmake/build/options.cmake b/cmake/build/options.cmake index 592935ae..ffd6867e 100644 --- a/cmake/build/options.cmake +++ b/cmake/build/options.cmake @@ -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)