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 #58v0.3.0-dev
parent
80c6816a54
commit
67c8e6a952
|
|
@ -289,6 +289,7 @@ if(NOT WIN32)
|
||||||
target_link_libraries(icsneocpp PUBLIC ftdi1-static)
|
target_link_libraries(icsneocpp PUBLIC ftdi1-static)
|
||||||
target_link_libraries(icsneocpp PUBLIC ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(icsneocpp PUBLIC ${CMAKE_THREAD_LIBS_INIT})
|
||||||
find_package(PCAP REQUIRED)
|
find_package(PCAP REQUIRED)
|
||||||
|
target_include_directories(icsneocpp PUBLIC ${PCAP_INCLUDE_DIR})
|
||||||
target_link_libraries(icsneocpp PUBLIC ${PCAP_LIBRARY})
|
target_link_libraries(icsneocpp PUBLIC ${PCAP_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue