Skip to content

[ONNX] CMake warning with find_package(ONNX CONFIG REQUIRED) #45599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
katrasnikj opened this issue May 20, 2025 · 0 comments · May be fixed by katrasnikj/vcpkg#1 or #45600
Open

[ONNX] CMake warning with find_package(ONNX CONFIG REQUIRED) #45599

katrasnikj opened this issue May 20, 2025 · 0 comments · May be fixed by katrasnikj/vcpkg#1 or #45600
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@katrasnikj
Copy link

katrasnikj commented May 20, 2025

When find_package(ONNX CONFIG REQUIRED) is called from user CMakeLists.txt the user gets the following CMake warning.

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:441 (message):
  The package name passed to find_package_handle_standard_args (Protobuf)
  does not match the name of the calling package (protobuf).  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):
  build/vcpkg_installed/x64-windows/share/protobuf/protobuf-module.cmake:162 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  build/vcpkg_installed/x64-windows/share/protobuf/protobuf-config.cmake:21 (include)
  build/vcpkg_installed/x64-windows/share/protobuf/vcpkg-cmake-wrapper.cmake:3 (_find_package)
  C:/repos/vcpkg/scripts/buildsystems/vcpkg.cmake:847 (include)
  C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  build/vcpkg_installed/x64-windows/share/ONNX/ONNXConfig.cmake:10 (find_dependency)
  C:/repos/vcpkg/scripts/buildsystems/vcpkg.cmake:893 (_find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

Proposed solution

Avoid the warning by using the correct name for Protobuf. The first letter should be uppercase.

@katrasnikj katrasnikj added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label May 20, 2025
@Mengna-Li Mengna-Li self-assigned this May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants