From c5314884ce88b04df3b11e304e940708d29f8a15 Mon Sep 17 00:00:00 2001 From: Kyle Schwarz Date: Mon, 20 Sep 2021 21:38:34 -0400 Subject: [PATCH] Build: Associate pcap include dir with icsneocpp If an external project links to the icsneocpp target and pcap has been installed in a non-standard location, the build will fail to find pcap.h because PCAP_INCLUDE_DIR is not associated with the target. Closes #58 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d03bef2..6c7d1e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -289,6 +289,7 @@ if(NOT WIN32) target_link_libraries(icsneocpp PUBLIC ftdi1-static) target_link_libraries(icsneocpp PUBLIC ${CMAKE_THREAD_LIBS_INIT}) find_package(PCAP REQUIRED) + target_include_directories(icsneocpp PUBLIC ${PCAP_INCLUDE_DIR}) target_link_libraries(icsneocpp PUBLIC ${PCAP_LIBRARY}) endif()