diff options
-rw-r--r-- | CMakeLists.txt | 49 | ||||
-rw-r--r-- | capinfos.c | 2 | ||||
-rw-r--r-- | captype.c | 2 | ||||
-rw-r--r-- | dumpcap.c | 2 | ||||
-rw-r--r-- | editcap.c | 2 | ||||
-rw-r--r-- | extcap.c | 2 | ||||
-rw-r--r-- | file.c | 2 | ||||
-rw-r--r-- | fuzz/CMakeLists.txt | 3 | ||||
-rw-r--r-- | fuzz/fuzzshark.c | 2 | ||||
-rw-r--r-- | mergecap.c | 2 | ||||
-rw-r--r-- | rawshark.c | 2 | ||||
-rw-r--r-- | reordercap.c | 2 | ||||
-rw-r--r-- | sharkd.c | 2 | ||||
-rw-r--r-- | sharkd_daemon.c | 2 | ||||
-rw-r--r-- | sharkd_session.c | 2 | ||||
-rw-r--r-- | text2pcap.c | 2 | ||||
-rw-r--r-- | tfshark.c | 2 | ||||
-rw-r--r-- | tshark.c | 2 | ||||
-rw-r--r-- | ui/CMakeLists.txt | 29 | ||||
-rw-r--r-- | ui/commandline.c | 2 | ||||
-rw-r--r-- | ui/decode_as_utils.c | 2 | ||||
-rw-r--r-- | ui/export_pdu_ui_utils.c | 2 | ||||
-rw-r--r-- | ui/qt/about_dialog.cpp | 2 | ||||
-rw-r--r-- | ui/qt/capture_file_properties_dialog.cpp | 2 | ||||
-rw-r--r-- | ui/qt/follow_stream_dialog.cpp | 2 | ||||
-rw-r--r-- | ui/qt/main.cpp | 2 | ||||
-rw-r--r-- | ui/qt/main_window.cpp | 2 | ||||
-rw-r--r-- | ui/qt/welcome_page.cpp | 2 | ||||
-rw-r--r-- | ui/tap_export_pdu.c | 2 | ||||
-rw-r--r-- | ui/version_info.c (renamed from version_info.c) | 0 | ||||
-rw-r--r-- | ui/version_info.h (renamed from version_info.h) | 0 |
31 files changed, 61 insertions, 72 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 952e5f1fd3..a9375dd5c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1936,13 +1936,6 @@ if(NOT WIN32) list(APPEND INSTALL_FILES COPYING) endif() -set(VERSION_INFO_LIBS - ${ZLIB_LIBRARIES} -) -set(VERSION_INFO_INCLUDE_DIRS - ${ZLIB_INCLUDE_DIRS} -) - if(WIN32) set(_dll_output_dir "${DATAFILE_DIR}") add_custom_target(copy_cli_dlls) @@ -2331,13 +2324,6 @@ list(APPEND copy_data_files_depends add_custom_target(copy_data_files ALL DEPENDS ${copy_data_files_depends} ) set_target_properties(copy_data_files PROPERTIES FOLDER "Copy Tasks") - -# Shared code, build object files once for all users. -add_library(version_info OBJECT version_info.c) -target_include_directories(version_info SYSTEM PRIVATE ${VERSION_INFO_INCLUDE_DIRS}) -if(NOT VCSVERSION_OVERRIDE) - add_dependencies(version_info version) -endif() # sources common for wireshark, tshark, rawshark and sharkd add_library(shark_common OBJECT cfile.c @@ -2350,7 +2336,7 @@ add_library(shark_common OBJECT add_library(cli_main OBJECT cli_main.c) add_library(capture_opts OBJECT capture_opts.c) target_include_directories(capture_opts SYSTEM PRIVATE ${PCAP_INCLUDE_DIRS}) -set_target_properties(version_info shark_common cli_main capture_opts +set_target_properties(shark_common cli_main capture_opts PROPERTIES COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" ) @@ -2366,7 +2352,6 @@ if(BUILD_wireshark AND QT_FOUND) $<TARGET_OBJECTS:capture_opts> $<TARGET_OBJECTS:qtui> $<TARGET_OBJECTS:shark_common> - $<TARGET_OBJECTS:version_info> ${WIRESHARK_SRC} ${PLATFORM_UI_RC_FILES} ) @@ -2451,8 +2436,8 @@ if(BUILD_wireshark AND QT_FOUND) caputils wiretap epan + version_info ${QT_LIBRARIES} - ${VERSION_INFO_LIBS} ${APPLE_APPLICATION_SERVICES_LIBRARY} ${APPLE_APPKIT_LIBRARY} ${APPLE_CORE_FOUNDATION_LIBRARY} @@ -2591,7 +2576,7 @@ if(BUILD_tshark) caputils wiretap epan - ${VERSION_INFO_LIBS} + version_info ${APPLE_CORE_FOUNDATION_LIBRARY} ${APPLE_SYSTEM_CONFIGURATION_LIBRARY} ${WIN_WS2_32_LIBRARY} @@ -2601,7 +2586,6 @@ if(BUILD_tshark) $<TARGET_OBJECTS:capture_opts> $<TARGET_OBJECTS:cli_main> $<TARGET_OBJECTS:shark_common> - $<TARGET_OBJECTS:version_info> tshark-tap-register.c tshark.c ${TSHARK_TAP_SRC} @@ -2620,14 +2604,13 @@ if(BUILD_tfshark) ui wiretap epan - ${VERSION_INFO_LIBS} + version_info ${APPLE_CORE_FOUNDATION_LIBRARY} ${APPLE_SYSTEM_CONFIGURATION_LIBRARY} ) set(tfshark_FILES $<TARGET_OBJECTS:cli_main> $<TARGET_OBJECTS:shark_common> - $<TARGET_OBJECTS:version_info> tfshark.c ${TSHARK_TAP_SRC} ) @@ -2644,7 +2627,7 @@ if(BUILD_rawshark AND PCAP_FOUND) ui wiretap epan - ${VERSION_INFO_LIBS} + version_info ${APPLE_CORE_FOUNDATION_LIBRARY} ${APPLE_SYSTEM_CONFIGURATION_LIBRARY} ${WIN_WS2_32_LIBRARY} @@ -2652,7 +2635,6 @@ if(BUILD_rawshark AND PCAP_FOUND) set(rawshark_FILES $<TARGET_OBJECTS:cli_main> $<TARGET_OBJECTS:shark_common> - $<TARGET_OBJECTS:version_info> rawshark.c ) set_executable_resources(rawshark "Rawshark") @@ -2667,7 +2649,7 @@ if(BUILD_sharkd) ui wiretap epan - ${VERSION_INFO_LIBS} + version_info ${APPLE_CORE_FOUNDATION_LIBRARY} ${APPLE_SYSTEM_CONFIGURATION_LIBRARY} ${WIN_WS2_32_LIBRARY} @@ -2680,7 +2662,6 @@ if(BUILD_sharkd) # $<TARGET_OBJECTS:cli_main> and has real_main(). # $<TARGET_OBJECTS:shark_common> - $<TARGET_OBJECTS:version_info> sharkd.c sharkd_daemon.c sharkd_session.c @@ -2699,7 +2680,7 @@ if(BUILD_dftest) ui wiretap epan - ${VERSION_INFO_LIBS} + version_info ) set(dftest_FILES dftest.c @@ -2721,7 +2702,6 @@ if(BUILD_randpkt) ) set(randpkt_FILES $<TARGET_OBJECTS:cli_main> - $<TARGET_OBJECTS:version_info> randpkt.c ) add_executable(randpkt ${randpkt_FILES}) @@ -2738,12 +2718,12 @@ if(BUILD_text2pcap) set(text2pcap_LIBS writecap wsutil + version_info ${M_LIBRARIES} ${ZLIB_LIBRARIES} ) set(text2pcap_FILES $<TARGET_OBJECTS:cli_main> - $<TARGET_OBJECTS:version_info> text2pcap.c ) add_lex_files(text2pcap_LEX_FILES text2pcap_FILES @@ -2761,12 +2741,12 @@ if(BUILD_mergecap) set(mergecap_LIBS ui wiretap + version_info ${ZLIB_LIBRARIES} ${CMAKE_DL_LIBS} ) set(mergecap_FILES $<TARGET_OBJECTS:cli_main> - $<TARGET_OBJECTS:version_info> mergecap.c ) set_executable_resources(mergecap "Mergecap") @@ -2780,12 +2760,12 @@ if(BUILD_reordercap) set(reordercap_LIBS ui wiretap + version_info ${ZLIB_LIBRARIES} ${CMAKE_DL_LIBS} ) set(reordercap_FILES $<TARGET_OBJECTS:cli_main> - $<TARGET_OBJECTS:version_info> reordercap.c ) set_executable_resources(reordercap "Reordercap") @@ -2800,13 +2780,13 @@ if(BUILD_capinfos) ui wiretap wsutil + version_info ${ZLIB_LIBRARIES} ${GCRYPT_LIBRARIES} ${CMAKE_DL_LIBS} ) set(capinfos_FILES $<TARGET_OBJECTS:cli_main> - $<TARGET_OBJECTS:version_info> capinfos.c ) set_executable_resources(capinfos "Capinfos") @@ -2821,12 +2801,12 @@ if(BUILD_captype) ui wiretap wsutil + version_info ${ZLIB_LIBRARIES} ${CMAKE_DL_LIBS} ) set(captype_FILES $<TARGET_OBJECTS:cli_main> - $<TARGET_OBJECTS:version_info> captype.c ) set_executable_resources(captype "Captype") @@ -2840,13 +2820,13 @@ if(BUILD_editcap) set(editcap_LIBS ui wiretap + version_info ${ZLIB_LIBRARIES} ${GCRYPT_LIBRARIES} ${CMAKE_DL_LIBS} ) set(editcap_FILES $<TARGET_OBJECTS:cli_main> - $<TARGET_OBJECTS:version_info> editcap.c ) set_executable_resources(editcap "Editcap") @@ -2862,6 +2842,7 @@ if(BUILD_dumpcap AND PCAP_FOUND) wsutil caputils ui + version_info pcap::pcap ${CAP_LIBRARIES} ${GLIB2_LIBRARIES} @@ -2874,7 +2855,6 @@ if(BUILD_dumpcap AND PCAP_FOUND) set(dumpcap_FILES $<TARGET_OBJECTS:capture_opts> $<TARGET_OBJECTS:cli_main> - $<TARGET_OBJECTS:version_info> dumpcap.c ringbuffer.c sync_pipe_write.c @@ -3394,7 +3374,6 @@ set(SHARK_PUBLIC_HEADERS ws_diag_control.h ws_log_defs.h ws_symbol_export.h - version_info.h ${CMAKE_BINARY_DIR}/ws_version.h ) diff --git a/capinfos.c b/capinfos.c index 9043c25a0f..495554b699 100644 --- a/capinfos.c +++ b/capinfos.c @@ -73,7 +73,7 @@ #include <wsutil/filesystem.h> #include <wsutil/privileges.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wiretap/wtap_opttypes.h> #ifdef HAVE_PLUGINS @@ -42,7 +42,7 @@ #include <wsutil/filesystem.h> #include <wsutil/privileges.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #ifdef HAVE_PLUGINS #include <wsutil/plugins.h> @@ -45,7 +45,7 @@ #include <ui/cmdarg_err.h> #include <wsutil/strtoi.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wsutil/socket.h> #include <wsutil/wslog.h> @@ -80,7 +80,7 @@ #include <wsutil/strnatcmp.h> #include <wsutil/str_util.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wsutil/pint.h> #include <wsutil/strtoi.h> #include <wsutil/ws_assert.h> @@ -49,7 +49,7 @@ #include "extcap.h" #include "extcap_parser.h" -#include "version_info.h" +#include "ui/version_info.h" static void extcap_child_watch_cb(GPid pid, gint status, gpointer user_data); @@ -24,7 +24,7 @@ #include <wsutil/json_dumper.h> #include <wsutil/wslog.h> #include <wsutil/ws_assert.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wiretap/merge.h> diff --git a/fuzz/CMakeLists.txt b/fuzz/CMakeLists.txt index 9e9598badc..c4229922b5 100644 --- a/fuzz/CMakeLists.txt +++ b/fuzz/CMakeLists.txt @@ -30,7 +30,7 @@ set(fuzzshark_LIBS ui wiretap epan - ${VERSION_INFO_LIBS} + version_info ) if(OSS_FUZZ) if("$ENV{LIB_FUZZING_ENGINE}" STREQUAL "") @@ -40,7 +40,6 @@ if(OSS_FUZZ) endif() set(fuzzshark_FILES fuzzshark.c - $<TARGET_OBJECTS:version_info> ) set(FUZZ_LINK_FLAGS "${WS_LINK_FLAGS}") if(ENABLE_FUZZER) diff --git a/fuzz/fuzzshark.c b/fuzz/fuzzshark.c index fdf25d64c3..162f23f56a 100644 --- a/fuzz/fuzzshark.c +++ b/fuzz/fuzzshark.c @@ -26,7 +26,7 @@ #include <wsutil/privileges.h> #include <wsutil/report_message.h> #include <wsutil/wslog.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wiretap/wtap.h> diff --git a/mergecap.c b/mergecap.c index 50e5c3481d..66c1d5d792 100644 --- a/mergecap.c +++ b/mergecap.c @@ -45,7 +45,7 @@ #include <wsutil/wslog.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #ifdef HAVE_PLUGINS #include <wsutil/plugins.h> diff --git a/rawshark.c b/rawshark.c index 2dcf93b565..1dafd06fa3 100644 --- a/rawshark.c +++ b/rawshark.c @@ -91,7 +91,7 @@ #include <wiretap/pcap-encap.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #include "capture/capture-pcap-util.h" diff --git a/reordercap.c b/reordercap.c index d845528cdd..643732c255 100644 --- a/reordercap.c +++ b/reordercap.c @@ -36,7 +36,7 @@ #include <wsutil/file_util.h> #include <wsutil/privileges.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wiretap/wtap_opttypes.h> #ifdef HAVE_PLUGINS @@ -30,7 +30,7 @@ #include <wsutil/privileges.h> #include <wsutil/report_message.h> #include <wsutil/wslog.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wiretap/wtap_opttypes.h> #include <epan/decode_as.h> diff --git a/sharkd_daemon.c b/sharkd_daemon.c index 5f65327512..0c9363301f 100644 --- a/sharkd_daemon.c +++ b/sharkd_daemon.c @@ -49,7 +49,7 @@ #endif #include <wsutil/strtoi.h> -#include <version_info.h> +#include <ui/version_info.h> #include "sharkd.h" diff --git a/sharkd_session.c b/sharkd_session.c index fa7e18e881..25aafd03e4 100644 --- a/sharkd_session.c +++ b/sharkd_session.c @@ -53,7 +53,7 @@ #include <ui/rtp_stream.h> #include <ui/tap-rtp-common.h> #include <ui/tap-rtp-analysis.h> -#include <version_info.h> +#include <ui/version_info.h> #include <epan/to_str.h> #include <epan/addr_resolv.h> diff --git a/text2pcap.c b/text2pcap.c index 9037e29031..a706027a86 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -101,7 +101,7 @@ #include <string.h> #include <wsutil/file_util.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wsutil/inet_addr.h> #include <wsutil/wslog.h> @@ -50,7 +50,7 @@ #include <wsutil/wslog.h> #include <wsutil/ws_assert.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #include "globals.h" #include <epan/timestamp.h> @@ -61,7 +61,7 @@ #include <wsutil/wslog.h> #include <wsutil/ws_assert.h> #include <cli_main.h> -#include <version_info.h> +#include <ui/version_info.h> #include <wiretap/wtap_opttypes.h> #include "globals.h" diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 06f829a77d..f3e0c6d3e6 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -78,17 +78,8 @@ set_source_files_properties( COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" ) - add_library(ui STATIC ${UI_SRC}) -set_target_properties(ui PROPERTIES - LINK_FLAGS "${WS_LINK_FLAGS}" - FOLDER "UI" -) -if(MSVC) - set_target_properties(ui PROPERTIES LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}") -endif() - target_link_libraries(ui wsutil caputils) target_include_directories(ui SYSTEM @@ -96,6 +87,26 @@ target_include_directories(ui SYSTEM ${WINSPARKLE_INCLUDE_DIRS} ) +add_library(version_info STATIC version_info.c) + +if(NOT VCSVERSION_OVERRIDE) + add_dependencies(version_info version) +endif() + +target_link_libraries(version_info PRIVATE ${ZLIB_LIBRARIES}) + +target_include_directories(version_info PRIVATE ${ZLIB_INCLUDE_DIRS}) + +set_target_properties(ui version_info PROPERTIES + LINK_FLAGS "${WS_LINK_FLAGS}" + FOLDER "UI" +) +if(MSVC) + set_target_properties(ui version_info PROPERTIES + LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}" + ) +endif() + add_definitions(-DDOC_DIR="${CMAKE_INSTALL_FULL_DOCDIR}") CHECKAPI( diff --git a/ui/commandline.c b/ui/commandline.c index 96135f4472..ebfc5eae50 100644 --- a/ui/commandline.c +++ b/ui/commandline.c @@ -29,7 +29,7 @@ #include <wsutil/wsgetopt.h> #endif -#include <version_info.h> +#include <ui/version_info.h> #include <ui/clopts_common.h> #include <ui/cmdarg_err.h> diff --git a/ui/decode_as_utils.c b/ui/decode_as_utils.c index 5357b44d52..be2164e372 100644 --- a/ui/decode_as_utils.c +++ b/ui/decode_as_utils.c @@ -25,7 +25,7 @@ #include "wsutil/filesystem.h" #include <wsutil/ws_assert.h> #include "ui/cmdarg_err.h" -#include "version_info.h" +#include "ui/version_info.h" /* XXX - We might want to switch this to a UAT */ diff --git a/ui/export_pdu_ui_utils.c b/ui/export_pdu_ui_utils.c index 7246b57f66..53e43bbba2 100644 --- a/ui/export_pdu_ui_utils.c +++ b/ui/export_pdu_ui_utils.c @@ -15,7 +15,7 @@ #include "globals.h" #include "wsutil/os_version_info.h" #include "wsutil/tempfile.h" -#include "version_info.h" +#include "ui/version_info.h" #include <epan/tap.h> #include <epan/exported_pdu.h> diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp index 14535baa60..27611a1f62 100644 --- a/ui/qt/about_dialog.cpp +++ b/ui/qt/about_dialog.cpp @@ -38,7 +38,7 @@ #include "wsutil/tempfile.h" #include "wsutil/plugins.h" #include "wsutil/copyright_info.h" -#include "version_info.h" +#include "ui/version_info.h" #include "extcap.h" diff --git a/ui/qt/capture_file_properties_dialog.cpp b/ui/qt/capture_file_properties_dialog.cpp index 8c23a6cb19..39241dcc1a 100644 --- a/ui/qt/capture_file_properties_dialog.cpp +++ b/ui/qt/capture_file_properties_dialog.cpp @@ -16,7 +16,7 @@ #include "wsutil/str_util.h" #include "wsutil/utf8_entities.h" -#include "version_info.h" +#include "ui/version_info.h" #include <ui/qt/utils/qt_ui_utils.h> #include "wireshark_application.h" diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp index e64bd5427b..4e36e09ea5 100644 --- a/ui/qt/follow_stream_dialog.cpp +++ b/ui/qt/follow_stream_dialog.cpp @@ -33,7 +33,7 @@ #include "wsutil/file_util.h" #include "wsutil/str_util.h" -#include "version_info.h" +#include "ui/version_info.h" #include "ws_symbol_export.h" diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp index 43b9b34ac1..975c0e21b5 100644 --- a/ui/qt/main.cpp +++ b/ui/qt/main.cpp @@ -48,7 +48,7 @@ #include <wsutil/report_message.h> #include <wsutil/please_report_bug.h> #include <wsutil/unicode-utils.h> -#include <version_info.h> +#include <ui/version_info.h> #include <epan/addr_resolv.h> #include <epan/ex-opt.h> diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 34ccf03ebd..6ff429918a 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -23,7 +23,7 @@ DIAG_ON(frame-larger-than=) #include <wsutil/filesystem.h> #include <wsutil/wslog.h> #include <wsutil/ws_assert.h> -#include <version_info.h> +#include <ui/version_info.h> #include <epan/prefs.h> #include <epan/stats_tree_priv.h> #include <epan/plugin_if.h> diff --git a/ui/qt/welcome_page.cpp b/ui/qt/welcome_page.cpp index 059a57334d..8631423ce4 100644 --- a/ui/qt/welcome_page.cpp +++ b/ui/qt/welcome_page.cpp @@ -16,7 +16,7 @@ #include "ui/capture_globals.h" #include "ui/urls.h" -#include "version_info.h" +#include "ui/version_info.h" #include "welcome_page.h" #include <ui_welcome_page.h> diff --git a/ui/tap_export_pdu.c b/ui/tap_export_pdu.c index 98190a8e2e..850148ca55 100644 --- a/ui/tap_export_pdu.c +++ b/ui/tap_export_pdu.c @@ -18,7 +18,7 @@ #include <wsutil/os_version_info.h> #include <wsutil/report_message.h> -#include "version_info.h" +#include "ui/version_info.h" #include "tap_export_pdu.h" diff --git a/version_info.c b/ui/version_info.c index b7e60cc381..b7e60cc381 100644 --- a/version_info.c +++ b/ui/version_info.c diff --git a/version_info.h b/ui/version_info.h index d16bb3cfbf..d16bb3cfbf 100644 --- a/version_info.h +++ b/ui/version_info.h |