toml11
toml11 copied to clipboard
Hard to use in vcpkg
vcpkg_fixup_cmake_targets(CONFIG_PATH share/toml11)
is not enough.
toml11config.cmake still looks for lib/cmake/toml11
.
Perhaps we can avoid hard-coded paths in CMakeLists.txt.
Unfortunately, I don't have any experience or knowledge in vcpkg. Therefore I have no idea about the usage of it in your situation. So I want to ask for more details about the problem.
I thought that vcpkg is for Windows only, but I just found out that it works also for linux and OS X. Since I have just installed it on VM, I can reproduce your problem if you provide the way to do that.
Perhaps we can avoid hard-coded paths in CMakeLists.txt.
Do you have any idea about which one should be changed?
FYI, the location where toml11 will be installed can be changed via CMAKE_INSTALL_LIBDIR
, CMAKE_INSTALL_INCLUDEDIR
and CMAKE_INSTALL_PREFIX
.
I will take a shot at this. I was thinking of a github action to test vcpkg integration, but it seems out of the scope for this project.
The problem is:
https://github.com/ToruNiina/toml11/blob/fda0a2b9abd16e356f777c40a675131821c71b00/cmake/toml11Config.cmake.in#L2
It should just state
include("${CMAKE_CURRENT_LIST_DIR}/toml11Targets.cmake")
since targets and configs should reside in the same directory.