ANother iteration,
[metze/wireshark/wip.git] / echld / CMakeLists.txt
1 # CMakeLists.txt
2 #
3 # $Id$
4 #
5 # Wireshark - Network traffic analyzer
6 # By Gerald Combs <gerald@wireshark.org>
7 # Copyright 1998 Gerald Combs
8 #
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.
13 #
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.
18 #
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.
22 #
23
24 set(ECHLD_FILES
25   echld_common.c
26   echld_child.c
27   echld_dispatcher.c
28   echld_parent.c
29   echld_util.c
30 )
31
32 set(wsutil_LIBS
33   ${GLIB2_LIBRARIES}
34 )
35
36 add_library(echld ${LINK_MODE_LIB}
37   ${ECHLD_FILES}
38 )
39
40 set(FULL_SO_VERSION "0.0.0")
41
42 set_target_properties(wsutil PROPERTIES COMPILE_DEFINITIONS "WS_BUILD_DLL")
43 set_target_properties(wsutil PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
44 set_target_properties(wsutil PROPERTIES VERSION ${FULL_SO_VERSION} SOVERSION 0)
45
46 # discover and substitute list of include directories for ABI compatibility
47 # checks
48 #get_directory_property(INCLUDE_DIRS INCLUDE_DIRECTORIES)
49 #list(REMOVE_DUPLICATES INCLUDE_DIRS)
50 #string(REGEX REPLACE ";" "\n" INCLUDE_DIRS "${INCLUDE_DIRS}")
51 #configure_file(../abi-descriptor.template abi-descriptor.xml)
52
53 # ABI compliance checker can be obtained from
54 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
55 # Checked using version 1.21.12
56 #file(GLOB HEADERS *.h)
57 #file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/abi-check-headers)
58 #
59 #file(COPY ${HEADERS} ../ws_symbol_export.h DESTINATION abi-check-headers)
60
61 #add_custom_command(OUTPUT libwsutil.abi.tar.gz
62 #       COMMAND cp ../config.h abi-check-headers/
63 #       COMMAND abi-compliance-checker -l libwsutil -v1 ${FULL_SO_VERSION}
64 #               -relpath ${CMAKE_CURRENT_BINARY_DIR} -dump-abi abi-descriptor.xml
65 #               || cat logs/libwsutil/[0-9]*/log.txt
66 #       COMMAND cp abi_dumps/libwsutil/libwsutil_* libwsutil.abi.tar.gz
67 #       COMMAND rm -rf abi-check-headers/* abi_dumps
68 #       DEPENDS ${HEADERS} wsutil)
69 #add_custom_target(dumpabi-libwsutil DEPENDS libwsutil.abi.tar.gz)
70
71 target_link_libraries(echld ${echld_LIBS})
72
73 if(NOT ${ENABLE_STATIC})
74         install(TARGETS echld
75                 LIBRARY DESTINATION lib
76                 RUNTIME DESTINATION lib
77                 ARCHIVE DESTINATION lib
78         )
79 endif()
80