You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that it is not advisable to populate any properties which may contain paths, such as INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_LINK_LIBRARIES, with paths relevant to dependencies. That would hard-code into installed packages the include directory or library paths for dependencies as found on the machine the package was made on.
I can't quite figure out how to fix this. I believe instead of target_link_libraries(tgt PCAP) there should be a find_dependency(PCAP) in libtinsConfig.cmake.
I think 3 should be resolved with the same type of solution as 1.
The text was updated successfully, but these errors were encountered:
I've never used the package file generated by CMake so I never came across this issues. But I guess it makes sense not to use hardcoded paths. If you find a way around that, I'll appreciate it :D.
BTW: I think you probably saw it, but it seems like travis.ci build for OSX failed when using CONFIGURE_PACKAGE_CONFIG_FILE on the PR you created yesterday.
Yes, I have a few fixes to make to the PR. I'm not sure exactly how to fix the hardcoded paths in the targets file. Was hoping you knew more CMake than I do :)
The installed package for libtins is not relocatable (it contains a bunch of absolute paths valid only on the machine in which is was built).
There are several sub-issues here:
CONFIGURE_PACKAGE_CONFIG_FILE()
should be used instead ofCONFIGURE_FILE()
(see Fix absolute paths in exported CMake config file. #100)
dependencies like libpcap.
to the install prefix.
I'm working on a PR for 1 (not quite there yet). This will remove hard coded paths from libtinsConfig.cmake.
For 2, I believe libtins needs to IMPORT pcap instead of doing
target_link_libraries
. See http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html#creating-packages.I can't quite figure out how to fix this. I believe instead of
target_link_libraries(tgt PCAP)
there should be afind_dependency(PCAP)
in libtinsConfig.cmake.I think 3 should be resolved with the same type of solution as 1.
The text was updated successfully, but these errors were encountered: