From ade8b40b3689e9456c0b019d52f4415c5d07be09 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Mon, 21 Dec 2020 21:17:10 +0100 Subject: [PATCH] cmake: Fix find_package_handle_standard_args warning --- cmake/modules/FindXcb.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/modules/FindXcb.cmake b/cmake/modules/FindXcb.cmake index 78e07239..04e5e7d6 100644 --- a/cmake/modules/FindXcb.cmake +++ b/cmake/modules/FindXcb.cmake @@ -26,6 +26,11 @@ foreach(_comp ${Xcb_FIND_COMPONENTS}) message(FATAL_ERROR "Unknow component \"${_comp}\" of XCB") endif() + # Bypass developer warning that the first argument to + # find_package_handle_standard_args (Xcb_...) does not match the name of the + # calling package (Xcb) + # https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html + set(FPHSA_NAME_MISMATCHED TRUE) find_package_impl(${XCB_${_comp}_pkg_config} "Xcb_${_comp}" "${XCB_${_comp}_header}") if(Xcb_${_comp}_FOUND AND NOT TARGET Xcb::${_comp})