wsutil/wsgcrypt.c decrypt_des_ecb
[wireshark-sm.git] / capture / CMakeLists.txt
blob70efbab6b7d0c217dbfe8e88fbcdfacc1ebf7bec
1 # CMakeLists.txt
3 # Wireshark - Network traffic analyzer
4 # By Gerald Combs <gerald@wireshark.org>
5 # Copyright 1998 Gerald Combs
7 # SPDX-License-Identifier: GPL-2.0-or-later
11 if(UNIX)
12         set(PLATFORM_CAPUTILS_SRC
13                 capture-pcap-util-unix.c
14         )
15 endif()
17 if(WIN32)
18         set(PLATFORM_CAPUTILS_SRC
19                 capture_win_ifnames.c
20                 capture-wpcap.c
21         )
22 endif()
24 set(CAPUTILS_SRC
25         ${PLATFORM_CAPUTILS_SRC}
26         capture-pcap-util.c
29 set_source_files_properties(
30         ${CAPUTILS_SRC}
31         PROPERTIES
32         COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
36 add_library(caputils STATIC
37         ${CAPUTILS_SRC}
40 target_link_libraries(caputils
41         PUBLIC
42                 $<$<BOOL:${PCAP_FOUND}>:pcap::pcap>
43         PRIVATE
44                 wsutil
45                 ${WIN_IPHLPAPI_LIBRARY}
47 if(WIN32)
48         target_link_libraries(caputils PRIVATE ${GMODULE2_LIBRARIES})
49 endif()
51 set_target_properties(caputils PROPERTIES
52         LINK_FLAGS "${WS_LINK_FLAGS}"
53         FOLDER "Libs")
54 if(MSVC)
55         set_target_properties(caputils PROPERTIES LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}")
56 endif()
58 set(CAPCHILD_SRC
59         capture_ifinfo.c
60         capture_sync.c
63 set_source_files_properties(
64         ${CAPCHILD_SRC}
65         PROPERTIES
66         COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
69 file(GLOB CAPCHILD_HEADERS capture_session.h)
71 add_library(capchild STATIC
72         ${CAPCHILD_SRC}
75 target_link_libraries(capchild
76         PRIVATE
77                 wsutil
78                 $<$<BOOL:${PCAP_FOUND}>:pcap::pcap>
81 set_target_properties(capchild PROPERTIES
82         LINK_FLAGS "${WS_LINK_FLAGS}"
83         FOLDER "Libs")
84 if(MSVC)
85         set_target_properties(capchild PROPERTIES LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}")
86 endif()
88 add_library(iface_monitor STATIC
89         iface_monitor.c
90         ws80211_utils.c
93 target_link_libraries(iface_monitor
94         PRIVATE
95                 ${NL_LIBRARIES}
98 target_include_directories(iface_monitor SYSTEM
99         PRIVATE
100                 ${NL_INCLUDE_DIRS}
103 CHECKAPI(
104         NAME
105           caputils-base
106         SWITCHES
107         SOURCES
108           ${CAPUTILS_SRC}
110 CHECKAPI(
111         NAME
112           caputils-todo
113         SWITCHES
114           -M
115         SOURCES
116           ${CAPUTILS_SRC}
120 # Editor modelines  -  https://www.wireshark.org/tools/modelines.html
122 # Local variables:
123 # c-basic-offset: 8
124 # tab-width: 8
125 # indent-tabs-mode: t
126 # End:
128 # vi: set shiftwidth=8 tabstop=8 noexpandtab:
129 # :indentSize=8:tabSize=8:noTabs=false: