Skip to content

Commit

Permalink
CMake: Use NAME_MISMATCHED in find_package_handle_standard_args of ECM
Browse files Browse the repository at this point in the history
Gets rid of mismatch warnings when looking for various
ECM packages like XCB.

Change-Id: I0bf4db993195993df7789c032454b7883e8efd35
Reviewed-by: Joerg Bornemann <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
  • Loading branch information
alcroito committed May 1, 2020
1 parent f2ae9b3 commit 88f6087
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ macro(ecm_find_package_handle_library_components module_name)
set(${module_name}_VERSION ${${module_name}_${ecm_fpwc_comp}_VERSION})
endif()

set(_name_mismatched_arg)
if(NOT CMAKE_VERSION VERSION_LESS 3.17)
set(_name_mismatched_arg NAME_MISMATCHED)
endif()
find_package_handle_standard_args(${module_name}_${ecm_fpwc_comp}
FOUND_VAR
${module_name}_${ecm_fpwc_comp}_FOUND
Expand All @@ -254,6 +258,7 @@ macro(ecm_find_package_handle_library_components module_name)
${ecm_fpwc_dep_vars}
VERSION_VAR
${module_name}_${ecm_fpwc_comp}_VERSION
${_name_mismatched_arg}
)

mark_as_advanced(
Expand Down

0 comments on commit 88f6087

Please sign in to comment.