Bug 421362 - find_package XCB Warning (dev) invalid package name passed to find_package_handle_standard_args does not match calling package
Summary: find_package XCB Warning (dev) invalid package name passed to find_package_ha...
Status: RESOLVED FIXED
Alias: None
Product: extra-cmake-modules
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.70.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: ecm-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-11 18:58 UTC by Alex
Modified: 2020-05-11 22:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.71.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2020-05-11 18:58:23 UTC
SUMMARY
The package name passed to `find_package_handle_standard_args` (XCB_XKB) does not match the name of the calling package (XCB).

STEPS TO REPRODUCE
1. find_package(XCB REQUIRED COMPONENTS XCB XKB)


OBSERVED RESULT
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (XCB_XCB)
  does not match the name of the calling package (XCB).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:248 (find_package_handle_standard_args)
  /usr/share/ECM/find-modules/FindXCB.cmake:183 (ecm_find_package_handle_library_components)
  CMakeLists.txt:204 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found XCB_XCB: /usr/lib64/libxcb.so (found version "1.14") 
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (XCB_XKB)
  does not match the name of the calling package (XCB).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:248 (find_package_handle_standard_args)
  /usr/share/ECM/find-modules/FindXCB.cmake:183 (ecm_find_package_handle_library_components)
  CMakeLists.txt:204 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.


EXPECTED RESULT
No Warning and correct variable names.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Base System release 2.7
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
CMake Version: 3.17.2
Comment 1 Christophe Marin 2020-05-11 20:45:06 UTC
Already fixed https://phabricator.kde.org/D29396
Comment 2 Alex 2020-05-11 22:23:03 UTC
Awesome, thanks!