diff options
author | Alex Merry <alex.merry@kde.org> | 2015-11-03 18:32:12 +0000 |
---|---|---|
committer | Alex Merry <alex.merry@kde.org> | 2015-11-17 21:23:27 +0000 |
commit | 7d6915b482820e53c46b3a68ac27d2ef8485a248 (patch) | |
tree | 58a78a70b1232e7716569d07503d08e30d7435db /modules/ECMFindModuleHelpers.cmake | |
parent | 208ad2b3c1959a70bc9a7b738e89ad3ee4ae2446 (diff) | |
download | extra-cmake-modules-7d6915b482820e53c46b3a68ac27d2ef8485a248.tar.gz extra-cmake-modules-7d6915b482820e53c46b3a68ac27d2ef8485a248.tar.bz2 |
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
Diffstat (limited to 'modules/ECMFindModuleHelpers.cmake')
-rw-r--r-- | modules/ECMFindModuleHelpers.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
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() |