-
Notifications
You must be signed in to change notification settings - Fork 760
Description
Describe the bug
I have installed Microsoft GSL 4.2 using vcpkg on Windows. The CMake version file that was installed however reports the version to be 4.1.0, so that if I explicitly request version 4.2.0 with find_package the library will not be found.
To Reproduce
This is how I installed Microsoft GSL, note how it says 4.2.0:
C:\tools\vcpkg>vcpkg install ms-gsl
Computing installation plan...
The following packages will be built and installed:
ms-gsl:x64-windows@4.2.0
< ... more vcpkg output ... >
Beginning of the CMake version file at C:/tools/vcpkg/installed/x64-windows/share/Microsoft.GSL/Microsoft.GSLConfig.cmake, note how it says 4.1.0 at the bottom of the excerpt:
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
# but only if the requested major version is the same as the current one.
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "4.1.0")
< ... more CMake code ... >
CMake output when I run find_package(Microsoft.GSL 4.2.0 CONFIG REQUIRED):
4> CMake Error at C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake:908 (_find_package):
4> Could not find a configuration file for package "Microsoft.GSL" that is
4> compatible with requested version "4.2.0".
4>
4> The following configuration files were considered but not accepted:
4>
4> C:/tools/vcpkg/installed/x64-windows/share/Microsoft.GSL/Microsoft.GSLConfig.cmake, version: 4.1.0
4> The version found is not compatible with the version requested.
Note that if I explicitly request version 4.1.0 the library is found as one would expect in that case.
Expected behaviour
If I install version 4.2.0, find_package should be able to find version 4.2.0
Metadata
Metadata
Assignees
Labels
Type
Projects
Status