Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard to use in vcpkg #110

Open
ncihnegn opened this issue Mar 29, 2020 · 3 comments
Open

Hard to use in vcpkg #110

ncihnegn opened this issue Mar 29, 2020 · 3 comments

Comments

@ncihnegn
Copy link

ncihnegn commented Mar 29, 2020

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.

@ToruNiina
Copy link
Owner

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.

@ncihnegn
Copy link
Author

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.

@Neumann-A
Copy link

The problem is:

include("@PACKAGE_toml11_install_cmake_dir@/toml11Targets.cmake")

It should just state
include("${CMAKE_CURRENT_LIST_DIR}/toml11Targets.cmake")
since targets and configs should reside in the same directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants