-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Using VCPKG_OVERRIDE_FIND_PACKAGE_NAME results in calls to unknown command _find_package
#25649
Comments
|
If you have problems with find_package being overriden by you somehow. Look at #23195 |
Thanks for the details @Neumann-A! It would be great to get that PR through. The workaround I used in my case was to add the following macro: macro(_find_package)
find_package(${ARGV})
endmacro() This allows |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
still relevant |
relevant |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
still relevant |
Describe the bug
I am using
'VCPKG_OVERRIDE_FIND_PACKAGE_NAME
to override the name of find_package to effectively change it tofind_vcpkg_package
for use in our project. In doing so, I have found that the scripts in vcpkg have made an assumption that find_package has been overloaded and that_find_package
is to be called. (See lines 792, 796, 798, etc. in vcpkg.cmake, for example). Unfortunately, this leads to errors like this:In this specific case, the issue is in the vcpkg-cmake-wrapper.cmake script where it is assuming that
_find_package
exists.Environment
To Reproduce
Set
VCPKG_OVERRIDE_FIND_PACKAGE_NAME
as you normally would on the command line for CMake to something likefind_vcpkg_package
. Somewhere in your project, add a call tofind_vcpkg_package
for any library of your choosing.Expected behavior
I would expect that
VCPKG_OVERRIDE_FIND_PACKAGE_NAME
is honored everywhere. If it is defined, thenfind_package
must be called. If it is NOT defined, then_find_package
can be called.The text was updated successfully, but these errors were encountered: