aboutsummaryrefslogtreecommitdiffstats
path: root/caputils
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2019-01-10 01:45:00 +0000
committerPeter Wu <peter@lekensteyn.nl>2019-01-20 11:50:10 +0000
commita3991874eb3d470a4adfcdef7903ab8d6dd8f881 (patch)
tree22a42523aae8ff158780e7504b072c1383aa4e91 /caputils
parentbe103a4286a55361d93f1aa2c25d8a180357a7b4 (diff)
CMake: Replace PACKAGELIST magic
This is more explicit and easier to read with slightly better locality while using less code. Also less awkward when the package doesn't fit the narrow package list expectations. The ws_find_package() macro doesn't include all the status messages. The choice was to rely on standard find_package() and feature_summary() output and be less verbose. Avoid polluting the CLI build interface. Per target include paths and macro definitions are preferred. Because this patch intentionally removes the global CMAKE_*_FLAGS and include_directories() usage in favor of target properties, some untested build configurations may inadvertently break because of missing ${PACKAGE}_INCLUDE_DIRS or ${PACKAGE}_DEFINITIONS. This required a manual review of dependencies that might have been incomplete. ${PACKAGE_VAR}_LINK_FLAGS seems to be unused. Changing the CMake Qt code to use more modern CMake component syntax is left as future work. Change-Id: I3ed75252189a6e05a23ed6e619088f519cd7ed78 Reviewed-on: https://code.wireshark.org/review/31496 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'caputils')
-rw-r--r--caputils/CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/caputils/CMakeLists.txt b/caputils/CMakeLists.txt
index a4f75d1f1d..7a4ba615ed 100644
--- a/caputils/CMakeLists.txt
+++ b/caputils/CMakeLists.txt
@@ -47,7 +47,17 @@ add_library(caputils STATIC
${CAPUTILS_SRC}
)
-target_link_libraries(caputils PUBLIC ${PCAP_LIBRARIES})
+target_link_libraries(caputils
+ PUBLIC
+ wsutil
+ PRIVATE
+ ${NL_LIBRARIES}
+)
+
+target_include_directories(caputils SYSTEM
+ PRIVATE
+ ${NL_INCLUDE_DIRS}
+)
if(WIN32)
target_link_libraries(caputils PRIVATE "iphlpapi.lib")