aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2019-05-01 16:13:28 +0100
committerJoão Valverde <j@v6e.pt>2019-05-03 21:56:45 +0000
commit4c5d2f5ccf822c07746853b065322c34dc322e8a (patch)
tree36cbd1b226a137eb38cf1e900b86e547235abd7e /cmake
parente5b4e673f0534fd26919cb7d3644b958d3020bea (diff)
CMake: Add libpcap imported library target
Change-Id: I5326b87784817fb353329e2d686fe0515c32f6cb Reviewed-on: https://code.wireshark.org/review/33038 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindPCAP.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/modules/FindPCAP.cmake b/cmake/modules/FindPCAP.cmake
index 8bb9b524f7..eab41f185c 100644
--- a/cmake/modules/FindPCAP.cmake
+++ b/cmake/modules/FindPCAP.cmake
@@ -262,3 +262,11 @@ if(PCAP_FOUND)
cmake_pop_check_state()
endif()
+
+if(PCAP_FOUND AND NOT TARGET pcap::pcap)
+ add_library(pcap::pcap UNKNOWN IMPORTED)
+ set_target_properties(pcap::pcap PROPERTIES
+ IMPORTED_LOCATION "${PCAP_LIBRARIES}"
+ INTERFACE_INCLUDE_DIRECTORIES "${PCAP_INCLUDE_DIRS}"
+ )
+endif()