More comment updates.
[metze/wireshark/wip.git] / epan / CMakeLists.txt
index b0fd8d7eb1e712527226e627ad1b0616a559d86b..067bf8bfba3a56fae1973e54d98c720444636a4c 100644 (file)
@@ -4,19 +4,7 @@
 # By Gerald Combs <gerald@wireshark.org>
 # Copyright 1998 Gerald Combs
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-or-later
 #
 
 include(UseABICheck)
@@ -99,14 +87,13 @@ set(LIBWIRESHARK_PUBLIC_HEADERS
        expert.h
        export_object.h
        exported_pdu.h
-       plugin_if.h
        filter_expressions.h
        follow.h
        frame_data.h
        frame_data_sequence.h
        funnel.h
        garrayfix.h
-       geoip_db.h
+       #geoip_db.h
        golay.h
        guid-utils.h
        iana_charsets.h
@@ -118,6 +105,7 @@ set(LIBWIRESHARK_PUBLIC_HEADERS
        ipv6.h
        lapd_sapi.h
        llcsaps.h
+       maxmind_db.h
        media_params.h
        next_tvb.h
        nlpid.h
@@ -127,6 +115,7 @@ set(LIBWIRESHARK_PUBLIC_HEADERS
        packet.h
        packet_info.h
        params.h
+       plugin_if.h
        ppptypes.h
        print.h
        print_stream.h
@@ -173,7 +162,7 @@ set(LIBWIRESHARK_PUBLIC_HEADERS
        xdlc.h
 )
 
-set(LIBWIRESHARK_FILES
+set(LIBWIRESHARK_NONGENERATED_FILES
        addr_and_mask.c
        addr_resolv.c
        address_types.c
@@ -203,29 +192,29 @@ set(LIBWIRESHARK_FILES
        expert.c
        export_object.c
        exported_pdu.c
-       plugin_if.c
        filter_expressions.c
        follow.c
        frame_data.c
        frame_data_sequence.c
        funnel.c
-       geoip_db.c
+       #geoip_db.c
        golay.c
        guid-utils.c
        iana_charsets.c
        in_cksum.c
        ipproto.c
+       maxmind_db.c
        media_params.c
        next_tvb.c
        oids.c
        osi-utils.c
        packet.c
+       plugin_if.c
        print.c
        print_stream.c
        prefs.c
        proto.c
        proto_data.c
-       ps.c
        range.c
        reassemble.c
        reedsolomon.c
@@ -256,14 +245,13 @@ set(LIBWIRESHARK_FILES
        value_string.c
        unit_strings.c
        xdlc.c
+       ${CMAKE_CURRENT_BINARY_DIR}/ps.c
        ${CMAKE_SOURCE_DIR}/version_info.c
 )
 
-set(LIBWIRESHARK_CLEAN_FILES
-       ${LIBWIRESHARK_FILES}
-)
+set(LIBWIRESHARK_FILES ${LIBWIRESHARK_NONGENERATED_FILES})
 
-add_lex_files(LEX_FILES GENERATED_FILES
+add_lex_files(LEX_FILES LIBWIRESHARK_FILES
        diam_dict.l
        dtd_parse.l
        dtd_preparse.l
@@ -271,7 +259,7 @@ add_lex_files(LEX_FILES GENERATED_FILES
        uat_load.l
 )
 
-add_lemon_files(LEMON_FILES GENERATED_FILES
+add_lemon_files(LEMON_FILES LIBWIRESHARK_FILES
        dtd_grammar.lemon
 )
 
@@ -280,8 +268,10 @@ set(epan_LIBS
        wsutil
        ${CARES_LIBRARIES}
        ${GCRYPT_LIBRARIES}
-       ${GEOIP_LIBRARIES}
+       #${GEOIP_LIBRARIES}
        ${GLIB2_LIBRARIES}
+       ${GIO2_LIBRARIES}
+       ${GTHREAD2_LIBRARIES}
        ${GNUTLS_LIBRARIES}
        ${KERBEROS_LIBRARIES}
        ${LUA_LIBRARIES}
@@ -293,35 +283,24 @@ set(epan_LIBS
        ${SNAPPY_LIBRARIES}
        ${WIN_PSAPI_LIBRARY}
        ${LIBXML2_LIBRARIES}
-)
-
-set(CLEAN_FILES
-       ${LIBWIRESHARK_CLEAN_FILES}
+       ${JSONGLIB_LIBRARIES}
 )
 
 set_source_files_properties(
-       ${CLEAN_FILES}
+       ${LIBWIRESHARK_FILES}
        PROPERTIES
        COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
 )
 
-# Cannot use $<$<BOOL:${HAVE_LIBLUA}>:$<TARGET_OBJECTS:wslua>> as that breaks
-# with CMake 3.0 (CMake 3.1 is OK)
-if(HAVE_LIBLUA)
-       set(wslua_sources $<TARGET_OBJECTS:wslua>)
-else()
-       set(wslua_sources)
-endif()
 add_library(epan
        ${LIBWIRESHARK_FILES}
-       ${GENERATED_FILES}
        $<TARGET_OBJECTS:crypt>
        $<TARGET_OBJECTS:dfilter>
        $<TARGET_OBJECTS:dissectors>
        $<TARGET_OBJECTS:dissectors-corba>
        $<TARGET_OBJECTS:ftypes>
        $<TARGET_OBJECTS:wmem>
-       ${wslua_sources}
+       $<$<BOOL:${HAVE_LIBLUA}>:$<TARGET_OBJECTS:wslua>>
        ${CMAKE_BINARY_DIR}/image/libwireshark.rc
 )
 
@@ -343,7 +322,7 @@ endif()
 
 ABICHECK(libwireshark)
 
-set(TOP_LEVEL_HEADERS ${CMAKE_BINARY_DIR}/config.h ${CMAKE_SOURCE_DIR}/register.h)
+set(TOP_LEVEL_HEADERS ${CMAKE_BINARY_DIR}/config.h)
 file(GLOB CRYPT_HEADERS crypt/*.h)
 file(GLOB DFILTER_HEADERS dfilter/*.h ../tools/lemon/cppmagic.h)
 file(GLOB D_HEADERS dissectors/*.h)
@@ -410,6 +389,7 @@ add_executable(exntest EXCLUDE_FROM_ALL exntest.c except.c)
 target_link_libraries(exntest ${GLIB2_LIBRARIES})
 set_target_properties(exntest PROPERTIES
        FOLDER "Tests"
+       EXCLUDE_FROM_DEFAULT_BUILD True
        COMPILE_DEFINITIONS "WS_BUILD_DLL"
 )
 
@@ -417,6 +397,7 @@ add_executable(oids_test EXCLUDE_FROM_ALL oids_test.c)
 target_link_libraries(oids_test epan ${ZLIB_LIBRARIES})
 set_target_properties(oids_test PROPERTIES
        FOLDER "Tests"
+       EXCLUDE_FROM_DEFAULT_BUILD True
        COMPILE_DEFINITIONS "WS_BUILD_DLL"
 )
 
@@ -424,12 +405,14 @@ add_executable(reassemble_test EXCLUDE_FROM_ALL reassemble_test.c)
 target_link_libraries(reassemble_test epan)
 set_target_properties(reassemble_test PROPERTIES
        FOLDER "Tests"
+       EXCLUDE_FROM_DEFAULT_BUILD True
 )
 
 add_executable(tvbtest EXCLUDE_FROM_ALL tvbtest.c)
 target_link_libraries(tvbtest epan)
 set_target_properties(tvbtest PROPERTIES
        FOLDER "Tests"
+       EXCLUDE_FROM_DEFAULT_BUILD True
        COMPILE_DEFINITIONS "WS_BUILD_DLL"
 )
 
@@ -439,7 +422,7 @@ CHECKAPI(
        SWITCHES
          -g termoutput -build
        SOURCES
-         ${LIBWIRESHARK_FILES}
+         ${LIBWIRESHARK_NONGENERATED_FILES}
 )
 
 #