a3a308ba0f600da1a64f5359704aba6e4caae3fc
[gd/wireshark/.git] / caputils / CMakeLists.txt
1 # CMakeLists.txt
2 #
3 # Wireshark - Network traffic analyzer
4 # By Gerald Combs <gerald@wireshark.org>
5 # Copyright 1998 Gerald Combs
6 #
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation; either version 2
10 # of the License, or (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21
22
23 if(UNIX)
24         set(PLATFORM_CAPUTILS_SRC
25                 capture-pcap-util-unix.c
26         )
27 endif()
28
29 if(WIN32)
30         set(PLATFORM_CAPUTILS_SRC
31                 capture_win_ifnames.c
32                 capture-wpcap.c
33                 capture_wpcap_packet.c
34         )
35 endif()
36
37 set(CAPUTILS_SRC
38         ${PLATFORM_CAPUTILS_SRC}
39         capture-pcap-util.c
40         iface_monitor.c
41         ws80211_utils.c
42 )
43
44 if (AIRPCAP_FOUND)
45         set(CAPUTILS_SRC
46                 ${CAPUTILS_SRC}
47                 airpcap_loader.c
48         )
49 endif()
50
51 set(CLEAN_FILES
52         ${CAPUTILS_SRC}
53 )
54
55 if (WERROR)
56         set_source_files_properties(
57                 ${CLEAN_FILES}
58                 PROPERTIES
59                 COMPILE_FLAGS -Werror
60         )
61 endif()
62
63
64 add_library(caputils STATIC
65         ${CAPUTILS_SRC}
66 )
67
68 set_target_properties(caputils PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
69 set_target_properties(caputils PROPERTIES FOLDER "CAPUTILS")