Changeset View
Changeset View
Standalone View
Standalone View
find-modules/FindKF5.cmake
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | |||||
70 | include(FeatureSummary) | 70 | include(FeatureSummary) | ||
71 | 71 | | |||
72 | set(KF5_VERSION) | 72 | set(KF5_VERSION) | ||
73 | foreach(_module ${KF5_FIND_COMPONENTS}) | 73 | foreach(_module ${KF5_FIND_COMPONENTS}) | ||
74 | find_package(KF5${_module} ${KF5_FIND_VERSION} | 74 | find_package(KF5${_module} ${KF5_FIND_VERSION} | ||
75 | ${_exact_arg} ${_quiet_arg} | 75 | ${_exact_arg} ${_quiet_arg} | ||
76 | CONFIG | 76 | CONFIG | ||
77 | ) | 77 | ) | ||
78 | find_package_handle_standard_args(KF5${_module} CONFIG_MODE) | 78 | # CMake >= 3.17 wants to be explictly told we are fine with name mismatch here | ||
79 | set(_name_mismatched_arg) | ||||
80 | if(NOT CMAKE_VERSION VERSION_LESS 3.17) | ||||
81 | set(_name_mismatched_arg NAME_MISMATCHED) | ||||
82 | endif() | ||||
83 | find_package_handle_standard_args(KF5${_module} CONFIG_MODE ${_name_mismatched_arg}) | ||||
79 | if (KF5_FIND_REQUIRED AND KF5_FIND_REQUIRED_${_module}) | 84 | if (KF5_FIND_REQUIRED AND KF5_FIND_REQUIRED_${_module}) | ||
80 | # If the component was required, we tell FeatureSummary so that it | 85 | # If the component was required, we tell FeatureSummary so that it | ||
81 | # will be displayed in the correct list. We do not use the REQUIRED | 86 | # will be displayed in the correct list. We do not use the REQUIRED | ||
82 | # argument of find_package() to allow all the missing frameworks | 87 | # argument of find_package() to allow all the missing frameworks | ||
83 | # to be listed at once (fphsa will error out at the end of this file | 88 | # to be listed at once (fphsa will error out at the end of this file | ||
84 | # anyway). | 89 | # anyway). | ||
85 | set_package_properties(KF5${_module} PROPERTIES TYPE REQUIRED) | 90 | set_package_properties(KF5${_module} PROPERTIES TYPE REQUIRED) | ||
86 | endif() | 91 | endif() | ||
Show All 33 Lines |