MSWSP: fix dissect_mswsp_smb()
[wireshark-wip.git] / wsutil / CMakeLists.txt
blobc107aca54f6e8a34bedbdb457bc7f09938b64299
1 # CMakeLists.txt
3 # $Id$
5 # Wireshark - Network traffic analyzer
6 # By Gerald Combs <gerald@wireshark.org>
7 # Copyright 1998 Gerald Combs
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 include(UseABICheck)
26 IF(WIN32)
27   set(WSUTIL_PLATFORM_FILES
28     file_util.c
29     inet_aton.c
30     inet_ntop.c
31     inet_pton.c
32     strptime.c
33     unicode-utils.c
34     wsgetopt.c
35   )
36 ENDIF(WIN32)
38 set(WSUTIL_FILES
39   adler32.c
40   aes.c
41   airpdcap_wep.c
42   crash_info.c
43   crc10.c
44   crc16.c
45   crc16-plain.c
46   crc32.c
47   crc6.c
48   crc7.c
49   crc8.c
50   crc11.c
51   crcdrm.c
52   des.c
53   eax.c
54   g711.c
55   md4.c
56   md5.c
57   mpeg-audio.c
58   nstime.c
59   privileges.c
60   sha1.c
61   strnatcmp.c
62   str_util.c
63   rc4.c
64   report_err.c
65   tempfile.c
66   type_util.c
67   u3.c
68   ${WSUTIL_PLATFORM_FILES}
71 set(wsutil_LIBS
72   ${GMODULE2_LIBRARIES}
73   ${GLIB2_LIBRARIES}
74   ${GCRYPT_LIBRARIES}
75   ${WIN_WSOCK32_LIBRARY}
77 IF(WIN32)
78   set(wsutil_LIBS ${wsutil_LIBS} "ws2_32.lib")
79 ENDIF(WIN32)
81 set(CLEAN_FILES
82   ${WSUTIL_FILES}
85 if (WERROR)
86   set_source_files_properties(
87     ${CLEAN_FILES}
88     PROPERTIES
89     COMPILE_FLAGS -Werror
90   )
91 endif()
93 add_library(wsutil ${LINK_MODE_LIB}
94   ${WSUTIL_FILES}
97 set(FULL_SO_VERSION "0.0.0")
99 set_target_properties(wsutil PROPERTIES COMPILE_DEFINITIONS "WS_BUILD_DLL")
100 set_target_properties(wsutil PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
101 set_target_properties(wsutil PROPERTIES VERSION ${FULL_SO_VERSION} SOVERSION 0)
102 set_target_properties(wsutil PROPERTIES FOLDER "DLLs")
104 ABICHECK(libwsutil)
106 add_custom_command(OUTPUT libwsutil.abi.tar.gz
107         COMMAND cp ../config.h ${ABICHECK_TMPDIR}/
108         COMMAND ${ABICHECK_COMMAND}
109         COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps/libwsutil/libwsutil_* ${CMAKE_CURRENT_BINARY_DIR}/libwsutil.abi.tar.gz
110         COMMAND rm -rf ${ABICHECK_TMPDIR}/* ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps
111         DEPENDS ${HEADERS} wsutil)
113 target_link_libraries(wsutil ${wsutil_LIBS})
115 if(NOT ${ENABLE_STATIC})
116         install(TARGETS wsutil
117                 LIBRARY DESTINATION lib
118                 RUNTIME DESTINATION lib
119                 ARCHIVE DESTINATION lib
120         )
121 endif()