[enchantum] fix cmake config path - #53257
Conversation
Billy O'Neal (BillyONeal)
left a comment
There was a problem hiding this comment.
GPT 5.6 Sol says:
The diagnosis in the PR description is correct, but the proposed relocation does not produce the claimed final layout.
At
ports/enchantum/portfile.cmakelines 17-23, the two config files are first moved intoshare/enchantum/cmake/, thenvcpkg_cmake_config_fixup(CONFIG_PATH "share/${PORT}/cmake")is called. A clean local install completed successfully, but installed:share/enchantum/enchantumConfig.cmake share/enchantum/enchantumConfigVersion.cmake share/enchantum/cmake/enchantumTargets.cmakeThe installed config still contains:
include("${CMAKE_CURRENT_LIST_DIR}/enchantumTargets.cmake")Therefore both Release and Debug example configurations fail with:
include could not find requested file: .../share/enchantum/enchantumTargets.cmake
which is plausible; should we add a test port since the lab is clearly not exercising this?
Correct the advertised language standard and ensure CI compiles a consumer through the installed enchantum CMake package and target. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Shock and horror the above review comment was wrong but I also asked it to add a test port, would you consider toge#34 ? |
[enchantum] add CMake integration regression test
|
Why not a patch and proper upstreaming... at least opening an issue? |
I thought it was specific to us due to where we required the CMake configs to go so I didn't ask to involve upstream. |
./vcpkg x-add-version --alland committing the result.Problem
Upstream installs the CMake package files into two different locations:
enchantumConfig.cmake/enchantumConfigVersion.cmake→<prefix>/cmake/enchantumTargets.cmake→<prefix>/share/enchantum/cmake/The portfile called
vcpkg_cmake_config_fixup(CONFIG_PATH "cmake"), which movesonly the config files into
share/enchantum/, leaving the targets file behind inshare/enchantum/cmake/. SinceenchantumConfig.cmakedoesinclude("${CMAKE_CURRENT_LIST_DIR}/enchantumTargets.cmake"), any consumer usingfind_package(enchantum CONFIG REQUIRED)fails with:Fix
Before running
vcpkg_cmake_config_fixup, move the config files intoshare/enchantum/cmake/next to the targets file, then run the fixup withCONFIG_PATH "share/${PORT}/cmake". The fixup then relocates all three filestogether into
share/enchantum/and corrects thePACKAGE_PREFIX_DIRcomputation.