mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.91k stars 375 forks source link

Bugfix/crosscompilation does not properly set include dir #340

Closed Kaisrlik closed 1 year ago

Kaisrlik commented 5 years ago

After cross-compilation I observe the variable LIBTINS_INCLUDE_DIRS in libtinsConfig.cmake file contains wrong value. For the reason I slightly rework it and make the include directory part of the target

Kaisrlik commented 5 years ago

Hello Matias, I played with cmake and I cannot find a way how to fix LIBTINS_INCLUDE_DIRS to work in all cases. Based on the cmake configuration described in 1 current configuration is alright. In addition I've browsed different projects to see how are using it. All projects what I saw they were using it in way of "targets" - similar to the first commit what I sent. For the reason I've kept the setting and added target_include_directory.