Skip to content

find_package(xyz_value_types CONFIG REQUIRED) fails with vcpkg and locally installed build #624

@jogerh

Description

@jogerh

find_package(xyz_value_types CONFIG REQUIRED) fails when consuming value_types through vcpkg, and when using find_package() to find a locally installed build. The error message from CMake is:

[cmake] CMake Error at build/vcpkg_installed/x64-linux/share/xyz_value_types/xyz_value_types-config.cmake:31 (include):
[cmake]   include could not find requested file:
[cmake]    ~/projects/vcpkgtest/build/vcpkg_installed/x64-linux/share/xyz_value_types/xyz_value_types-target.cmake
[cmake] Call Stack (most recent call first):
[cmake]   ~/projects/vcpkg/scripts/buildsystems/vcpkg.cmake:908 (_find_package)
[cmake]   CMakeLists.txt:10 (find_package)

The reason seems to be that xyz_value_types-config.cmake.in includes xyz_value_types-target.cmake, but the installed config file is called xyz_value_types-export-set.cmake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions