From 7d6915b482820e53c46b3a68ac27d2ef8485a248 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Tue, 3 Nov 2015 18:32:12 +0000 Subject: Do not find XCB's XINPUT library by default. The XINPUT library is unlikely to be available on many systems, including a lot of Linux distributions. This will warn developers in advance by (a) not searching for XINPUT unless it was explicitly requested, and (b) printing a warning if they do request it. REVIEW: 125935 --- modules/ECMFindModuleHelpers.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/ECMFindModuleHelpers.cmake') diff --git a/modules/ECMFindModuleHelpers.cmake b/modules/ECMFindModuleHelpers.cmake index 63cccb93..2044efe1 100644 --- a/modules/ECMFindModuleHelpers.cmake +++ b/modules/ECMFindModuleHelpers.cmake @@ -122,7 +122,7 @@ endmacro() macro(ecm_find_package_parse_components module_name) set(ecm_fppc_options SKIP_DEPENDENCY_HANDLING) set(ecm_fppc_oneValueArgs RESULT_VAR) - set(ecm_fppc_multiValueArgs KNOWN_COMPONENTS) + set(ecm_fppc_multiValueArgs KNOWN_COMPONENTS DEFAULT_COMPONENTS) cmake_parse_arguments(ECM_FPPC "${ecm_fppc_options}" "${ecm_fppc_oneValueArgs}" "${ecm_fppc_multiValueArgs}" ${ARGN}) if(ECM_FPPC_UNPARSED_ARGUMENTS) @@ -134,6 +134,9 @@ macro(ecm_find_package_parse_components module_name) if(NOT ECM_FPPC_KNOWN_COMPONENTS) message(FATAL_ERROR "Missing KNOWN_COMPONENTS argument to ecm_find_package_parse_components") endif() + if(NOT ECM_FPPC_DEFAULT_COMPONENTS) + set(ECM_FPPC_DEFAULT_COMPONENTS ${ECM_FPPC_KNOWN_COMPONENTS}) + endif() if(${module_name}_FIND_COMPONENTS) set(ecm_fppc_requestedComps ${${module_name}_FIND_COMPONENTS}) @@ -178,7 +181,7 @@ macro(ecm_find_package_parse_components module_name) return() endif() else() - set(${ECM_FPPC_RESULT_VAR} ${ECM_FPPC_KNOWN_COMPONENTS}) + set(${ECM_FPPC_RESULT_VAR} ${ECM_FPPC_DEFAULT_COMPONENTS}) endif() endmacro() -- cgit v1.2.1