From ebc874095b4d78bc6a6e71da8f4ea3bed31713f9 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Wed, 22 Apr 2020 15:41:15 +0200 Subject: Adapt FindKF5 to stricter checks in newer find_package_handle_standard_args Test Plan: KF modules configure build as before, same some apps. Reviewers: #frameworks, #build_system, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D29097 --- find-modules/FindKF5.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'find-modules') diff --git a/find-modules/FindKF5.cmake b/find-modules/FindKF5.cmake index b0ba9f6b..9be73a9a 100644 --- a/find-modules/FindKF5.cmake +++ b/find-modules/FindKF5.cmake @@ -75,7 +75,12 @@ foreach(_module ${KF5_FIND_COMPONENTS}) ${_exact_arg} ${_quiet_arg} CONFIG ) - find_package_handle_standard_args(KF5${_module} CONFIG_MODE) + # CMake >= 3.17 wants to be explictly told we are fine with name mismatch here + set(_name_mismatched_arg) + if(NOT CMAKE_VERSION VERSION_LESS 3.17) + set(_name_mismatched_arg NAME_MISMATCHED) + endif() + find_package_handle_standard_args(KF5${_module} CONFIG_MODE ${_name_mismatched_arg}) if (KF5_FIND_REQUIRED AND KF5_FIND_REQUIRED_${_module}) # If the component was required, we tell FeatureSummary so that it # will be displayed in the correct list. We do not use the REQUIRED -- cgit v1.2.1