You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation of find_package() states that it sets <PackageName>_FOUND. However, after I call find_package(plibsys CONFIG REQUIRED) in my CML file, plibsys_FOUND is not set. I am not sure if this bug is directly related to vcpkg, but when I wanted to check the CMake config file in .../vcpkg/installed/x64-windows/share/plibsys I only found vcpkg-cmake-wrapper.cmake which manually sets PLIBSYS_INCLUDE_DIRS and PLIBSYS_LIBRARIES. Therefore, I thought that this wrapper might also be responsible for manually setting plibsys_FOUND.
The way how I discovered this was via find_dependency(plibsys) in a CMake config file of "MyCMakeProject", which throws an error stating that it cannot find plibsys which is very weird because find_package(plibsys CONFIG REQUIRED) does not throw an error and building "MyCMakeProject" works.
Environment
OS: Windows
Compiler: MSVC 19.39.33523 for x64
To Reproduce
Steps to reproduce the behavior:
./vcpkg install plibsys
Create simple example CMake project that calls find_package(plibsys CONFIG REQUIRED) and print the value of plibsys_FOUND afterwards.
Nothing will be printed
Repro code:
cmake_minimum_required(VERSION 3.27)
project(MyCMakeProject VERSION 1.0.0 LANGUAGES CXX)
find_package(plibsys CONFIG REQUIRED)
message("----- plibsys_FOUND = ${plibsys_FOUND}")
Expected behavior
plibsys_FOUND is set to 0 or 1 after the find_package() call
Failure logs
Found package configuration file:
[cmake]
[cmake] C:/Program Files (x86)/MyCMakeProject/share/MyCMakeProject/MyCMakeProjectConfig.cmake
[cmake]
[cmake] but it set MyCMakeProject_FOUND to FALSE so package "MyCMakeProject" is
[cmake] considered to be NOT FOUND. Reason given by package:
[cmake]
[cmake] MyCMakeProject could not be found because dependency plibsys could not be
[cmake] found.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
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.
Describe the bug
The documentation of
find_package()
states that it sets<PackageName>_FOUND
. However, after I callfind_package(plibsys CONFIG REQUIRED)
in my CML file,plibsys_FOUND
is not set. I am not sure if this bug is directly related to vcpkg, but when I wanted to check the CMake config file in.../vcpkg/installed/x64-windows/share/plibsys
I only foundvcpkg-cmake-wrapper.cmake
which manually setsPLIBSYS_INCLUDE_DIRS
andPLIBSYS_LIBRARIES
. Therefore, I thought that this wrapper might also be responsible for manually settingplibsys_FOUND
.The way how I discovered this was via
find_dependency(plibsys)
in a CMake config file of "MyCMakeProject", which throws an error stating that it cannot find plibsys which is very weird becausefind_package(plibsys CONFIG REQUIRED)
does not throw an error and building "MyCMakeProject" works.Environment
To Reproduce
Steps to reproduce the behavior:
find_package(plibsys CONFIG REQUIRED)
and print the value ofplibsys_FOUND
afterwards.Repro code:
Expected behavior
plibsys_FOUND
is set to 0 or 1 after thefind_package()
callFailure logs
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: