set(LOG_PROJECT_NAME ${_log_project_name})
set(LOG_PROJECT_MAJOR_VERSION 0)
-set(LOG_PROJECT_MINOR_VERSION 8)
-set(LOG_PROJECT_PATCH_VERSION 3)
+set(LOG_PROJECT_MINOR_VERSION 9)
+set(LOG_PROJECT_PATCH_VERSION 0)
set(LOG_PROJECT_VERSION "${LOG_PROJECT_MAJOR_VERSION}.${LOG_PROJECT_MINOR_VERSION}.${LOG_PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION}")
include( CMakeOptions.txt )
file(TO_CMAKE_PATH ${EXTRA_INSTALLER_DIR} _file_download_dir)
# Download Npcap required by the Windows installer
- set(NPCAP_VERSION "1.77")
- set(NPCAP_SHA256 "4b8896513505dde38b8250bfbb1c413deecde78aabda11f6a65c2ee250ddd79f")
+ set(NPCAP_VERSION "1.78")
+ set(NPCAP_SHA256 "deeb39ae22a44ea2698c4a58732e621bc45b84686a444c405491fef946898d90")
set(NPCAP_FILENAME "npcap-${NPCAP_VERSION}.exe")
set(NPCAP_URL "${LIBS_URL}/Npcap/${NPCAP_FILENAME}")
FetchContent_Declare(Npcap
set(CMAKE_INSTALL_INCLUDEDIR "include")
set(CMAKE_INSTALL_DATADIR ".")
set(CMAKE_INSTALL_DOCDIR ".")
-else()
- # By default INSTALL_DATADIR is set to INSTALL_DATAROOTDIR, set the
- # proper value here.
- set(CMAKE_INSTALL_DATADIR "share/${PROJECT_NAME}"
- CACHE PATH "Read-only architecture-independent data"
- )
endif()
include(GNUInstallDirs)
# Make sure our executables can load our libraries if we install into
# a non-default directory on Unix-like systems other than macOS.
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
-set(LIBRARY_INSTALL_RPATH "")
-set(EXECUTABLE_INSTALL_RPATH "")
-set(EXTCAP_INSTALL_RPATH "")
+set(LIBRARY_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}")
+set(EXECUTABLE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}")
+set(EXTCAP_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}")
if(NOT (WIN32 OR APPLE OR USE_STATIC))
# Try to set a RPATH for installed binaries if the library directory is
# not already included in the default search list.
# C Asynchronous resolver
reset_find_package(CARES)
find_package(CARES "1.13.0" REQUIRED)
+if (CARES_VERSION VERSION_GREATER_EQUAL "1.28.0")
+ # Suppress deprecation warnings.
+ add_compile_definitions(CARES_NO_DEPRECATED)
+endif ()
find_package(LEX REQUIRED)
find_package(Perl)
find_package(PCRE2 REQUIRED)
else()
set(ENABLE_LIBSSH OFF)
endif()
-ws_find_package(LIBSSH ENABLE_LIBSSH HAVE_LIBSSH "0.6")
+ws_find_package(LIBSSH ENABLE_LIBSSH HAVE_LIBSSH "0.8.5")
ws_find_package(PCAP ENABLE_PCAP HAVE_LIBPCAP)
ws_find_package(AIRPCAP ENABLE_AIRPCAP HAVE_AIRPCAP)
Widgets
Concurrent
Core5Compat
+ DBus
OPTIONAL_COMPONENTS
Multimedia
)
if(WIN32)
list(APPEND QT5_PACKAGELIST Qt5WinExtras)
endif()
+ if(NOT WIN32 AND NOT APPLE)
+ # DBus is a core component of Qt6, but was an add-on in Qt5.
+ list(APPEND QT5_OPTIONAL_PACKAGELIST Qt5DBus)
+ endif()
foreach(_qt5_package IN LISTS QT5_PACKAGELIST)
find_package(${_qt5_package} REQUIRED ${QT5_FIND_PACKAGE_OPTIONS})
list(APPEND QT5_LIBRARIES ${${_qt5_package}_LIBRARIES})
list(APPEND QT5_COMPILE_DEFINITIONS ${${_qt5_package}_COMPILE_DEFINITIONS})
endforeach()
- if (Qt5Widgets_VERSION VERSION_LESS 5.10)
+ if (Qt5Widgets_VERSION VERSION_LESS 5.11)
message(FATAL_ERROR "Qt 5.12 or later is required.")
endif()
if (Qt5Widgets_VERSION VERSION_LESS 5.12)
- message(WARNING "Wireshark can be build with this version of Qt, though 5.12 or higher is recommended.")
+ message(WARNING "Wireshark can be built with this version of Qt, though 5.12 or higher is recommended.")
endif()
if(APPLE AND "/usr/local/opt/qt5/lib/QtCore.framework" IN_LIST Qt5Core_INCLUDE_DIRS)
if(Qt6Multimedia_FOUND OR Qt5Multimedia_FOUND)
set(QT_MULTIMEDIA_LIB 1)
endif()
+ if(Qt6DBus_FOUND OR Qt5DBus_FOUND)
+ set(QT_DBUS_LIB 1)
+ endif()
if(NOT DEFINED MOC_OPTIONS)
# Squelch moc verbose "nothing to do" output
set(MOC_OPTIONS -nn)
# Embedded Lua interpreter
if(FETCH_lua)
# Download and build lua
- include(${CMAKE_SOURCE_DIR}/cmake/external/lua52/Lua52.cmake)
+ include(${CMAKE_SOURCE_DIR}/cmake/external/lua53/Lua53.cmake)
else()
- set(LUA_FIND_VERSIONS "5.2;5.1" CACHE STRING "Lua versions valid for the build (as a list)")
+ set(LUA_FIND_VERSIONS "5.4;5.3" CACHE STRING "Lua versions valid for the build (as a list)")
ws_find_package(Lua ENABLE_LUA HAVE_LUA)
endif()
# https://doc.qt.io/qt-5.11/supported-platforms-and-configurations.html
# https://doc.qt.io/qt-5.15/supported-platforms.html
# https://doc-snapshots.qt.io/qt6-dev/supported-platforms.html
- if(Qt${qtver}Widgets_VERSION VERSION_GREATER_EQUAL "6.5.0")
+ if(Qt${qtver}Widgets_VERSION VERSION_GREATER_EQUAL "6.5.0" AND MIN_MACOS_VERSION VERSION_LESS "11.0")
set(MIN_MACOS_VERSION 11.0)
- elseif(Qt${qtver}Widgets_VERSION VERSION_GREATER_EQUAL "6.0.0")
+ elseif(Qt${qtver}Widgets_VERSION VERSION_GREATER_EQUAL "6.0.0" AND MIN_MACOS_VERSION VERSION_LESS "10.14")
set(MIN_MACOS_VERSION 10.14)
- elseif(Qt5Widgets_VERSION VERSION_GREATER_EQUAL "5.14.0")
+ elseif(Qt5Widgets_VERSION VERSION_GREATER_EQUAL "5.14.0" AND MIN_MACOS_VERSION VERSION_LESS "10.13")
set(MIN_MACOS_VERSION 10.13)
- elseif(Qt5Widgets_VERSION VERSION_GREATER_EQUAL "5.12.0")
+ elseif(Qt5Widgets_VERSION VERSION_GREATER_EQUAL "5.12.0" AND MIN_MACOS_VERSION VERSION_LESS "10.12")
set(MIN_MACOS_VERSION 10.12)
endif()
if(CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS MIN_MACOS_VERSION)
# If you change the nesting level be sure to check also the INSTALL_RPATH
# target property.
if(WIN32 AND NOT USE_MSYSTEM)
- set(EXTCAP_INSTALL_LIBDIR "extcap" CACHE INTERNAL "The extcap dir")
+ set(EXTCAP_INSTALL_LIBDIR "extcap/${PROJECT_NAME}" CACHE INTERNAL "The Wireshark extcap dir")
+ if (BUILD_logray)
+ set(LOG_EXTCAP_INSTALL_LIBDIR "extcap/${LOG_PROJECT_NAME}" CACHE INTERNAL "The Logray extcap dir")
+ endif()
else()
- set(EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extcap" CACHE INTERNAL "The extcap dir")
+ set(EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extcap" CACHE INTERNAL "The Wireshark extcap dir")
+ if (BUILD_logray)
+ set(LOG_EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${LOG_PROJECT_NAME}/extcap" CACHE INTERNAL "The Logray extcap dir")
+ endif()
endif()
-set(EXTCAP_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}")
if(APPLE)
#
plugins/epan/wimax
plugins/epan/wimaxasncp
plugins/epan/wimaxmacphy
+ plugins/epan/dfilter/ipaddr
plugins/wiretap/usbdump
plugins/codecs/G711
plugins/codecs/l16_mono
configure_file(${CMAKE_SOURCE_DIR}/ws_version.h.in ${CMAKE_BINARY_DIR}/ws_version.h)
-set( prefix "${CMAKE_INSTALL_PREFIX}" )
-set( exec_prefix "\${prefix}" )
-set( libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}" )
-set( includedir "\${prefix}/include" )
-set( plugindir "\${libdir}/wireshark/${PLUGIN_VERSION_DIR}" )
-
# Doxygen variables
file(GLOB TOP_LEVEL_SOURCE_LIST *.c *.cpp *.h)
string (REPLACE ";" " " DOXYGEN_TOP_LEVEL_SOURCES "${TOP_LEVEL_SOURCE_LIST}")
resources/libwiretap.rc
resources/libwsutil.rc
resources/wireshark.exe.manifest
+ resources/wireshark.pc
resources/wireshark.rc
- wireshark.pc
)
if(BUILD_logray)
set_package_properties(SNAPPY PROPERTIES
DESCRIPTION "A fast compressor/decompressor from Google"
URL "https://google.github.io/snappy/"
- PURPOSE "Snappy decompression in CQL and Kafka dissectors"
+ PURPOSE "Snappy decompression in Couchbase, CQL, Kafka and Mongo dissectors"
)
set_package_properties(ZSTD PROPERTIES
DESCRIPTION "A compressor/decompressor from Facebook providing better compression than Snappy at a cost of speed"
set(PLATFORM_UI_SRC
ui/win32/file_dlg_win32.cpp
)
- set(PLATFORM_UI_RC_FILES
- resources/file_dlg_win32.rc
- )
elseif(APPLE)
set(PLATFORM_UI_SRC
ui/macosx/cocoa_bridge.mm
)
-# Installed into ${DATAFILE_DIR}
+# Copied into ${DATAFILE_DIR} at build time and ${CMAKE_INSTALL_DATADIR}/wireshark
+# at install time.
set(INSTALL_DIRS
resources/share/wireshark/profiles
resources/protocols/diameter
resources/protocols/wimaxasncp
)
-# Installed into ${DATAFILE_DIR}
+# Copied into ${DATAFILE_DIR} at build time and ${CMAKE_INSTALL_DATADIR}/wireshark
+# at install time.
set(INSTALL_FILES
resources/share/wireshark/cfilters
resources/share/wireshark/colorfilters
- resources/share/wireshark/dfilter_macros
+ resources/share/wireshark/dmacros
resources/share/wireshark/dfilters
resources/share/wireshark/ipmap.html
resources/share/wireshark/smi_modules
)
if (BUILD_logray)
+ set(LOG_INSTALL_DIRS
+ resources/share/logray/profiles
+ )
+
set(LOG_INSTALL_FILES
docbook/ws.css
resources/share/logray/colorfilters
list (APPEND THIRD_PARTY_DLLS "${LZ4_DLL_DIR}/${LZ4_DLL}")
list (APPEND THIRD_PARTY_PDBS "${LZ4_DLL_DIR}/${LZ4_PDB}")
endif(LZ4_FOUND)
- if (ZSTD_FOUND)
- list (APPEND THIRD_PARTY_DLLS "${ZSTD_DLL_DIR}/${ZSTD_DLL}")
- endif(ZSTD_FOUND)
+ if (MINIZIP_FOUND)
+ list (APPEND THIRD_PARTY_DLLS "${MINIZIP_DLL_DIR}/${MINIZIP_DLL}")
+ list (APPEND THIRD_PARTY_PDBS "${MINIZIP_DLL_DIR}/${MINIZIP_PDB}")
+ endif()
if (NGHTTP2_FOUND)
list (APPEND THIRD_PARTY_DLLS "${NGHTTP2_DLL_DIR}/${NGHTTP2_DLL}")
list (APPEND THIRD_PARTY_PDBS "${NGHTTP2_DLL_DIR}/${NGHTTP2_PDB}")
if (SPEEXDSP_FOUND)
list (APPEND THIRD_PARTY_DLLS "${SPEEXDSP_DLL_DIR}/${SPEEXDSP_DLL}")
endif()
+ if (ZSTD_FOUND)
+ list (APPEND THIRD_PARTY_DLLS "${ZSTD_DLL_DIR}/${ZSTD_DLL}")
+ endif()
# With libs downloaded to c:/wireshark-x64-libs this currently
# (early 2018) expands to about 1900 characters.
set(copy_data_files_depends)
if(WIN32)
- foreach(_install_as_txt_file COPYING NEWS README.md README.windows)
+ foreach(_install_as_txt_file COPYING NEWS README.md)
# On Windows, install some files with a .txt extension so that they're
# double-clickable.
string(REGEX REPLACE ".md$" "" _no_md_file ${_install_as_txt_file})
list(APPEND copy_data_files_depends "${_output_file}")
endforeach()
-if (BUILD_logray AND ENABLE_APPLICATION_BUNDLE)
- foreach(_install_file ${LOG_INSTALL_FILES})
- get_filename_component(_install_file_src "${_install_file}" ABSOLUTE)
- get_filename_component(_install_basename "${_install_file}" NAME)
- set(_output_file "${LOG_DATAFILE_DIR}/${_install_basename}")
- add_custom_command(OUTPUT "${_output_file}"
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${_install_file_src}"
- "${_output_file}"
- DEPENDS
- docs
- "${_install_file}"
- )
- list(APPEND copy_data_files_depends "${_output_file}")
- endforeach()
+if (BUILD_logray)
+ if (ENABLE_APPLICATION_BUNDLE)
+ foreach(_install_file ${LOG_INSTALL_FILES})
+ get_filename_component(_install_file_src "${_install_file}" ABSOLUTE)
+ get_filename_component(_install_basename "${_install_file}" NAME)
+ set(_output_file "${LOG_DATAFILE_DIR}/${_install_basename}")
+ add_custom_command(OUTPUT "${_output_file}"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${_install_file_src}"
+ "${_output_file}"
+ DEPENDS
+ docs
+ "${_install_file}"
+ )
+ list(APPEND copy_data_files_depends "${_output_file}")
+ endforeach()
+ else()
+ # XXX The default profile (colorfilters, dfilters) is at the
+ # top-level resources directory for both Wireshark and Logray.
+ endif()
endif()
set(_protocol_data_dir ${CMAKE_SOURCE_DIR}/resources/protocols)
"${CMAKE_SOURCE_DIR}/resources/share/wireshark/profiles" "${DATAFILE_DIR}/profiles"
)
+set (_log_profiles_data_files)
+if (BUILD_logray AND ENABLE_APPLICATION_BUNDLE)
+ set(_profiles_src_dir ${CMAKE_SOURCE_DIR}/resources/share/logray)
+ file(GLOB _profiles_src_files RELATIVE ${_profiles_src_dir} ${_profiles_src_dir}/profiles/*/*)
+ foreach(_data_file ${_profiles_src_files})
+ list(APPEND _log_profiles_data_files "${LOG_DATAFILE_DIR}/${_data_file}")
+ endforeach()
+
+ add_custom_command(
+ OUTPUT ${_log_profiles_data_files}
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ "${CMAKE_SOURCE_DIR}/resources/share/logray/profiles" "${LOG_DATAFILE_DIR}/profiles"
+ )
+endif()
+
list(APPEND copy_data_files_depends
${_dtds_data_files}
${_diameter_data_files}
${_radius_data_files}
${_protobuf_data_files}
${_profiles_data_files}
+ ${_log_profiles_data_files}
)
# Copy files including ${INSTALL_FILES} and ${INSTALL_DIRS} to ${DATAFILE_DIR}
if (BUILD_logray AND FALCO_PLUGINS)
add_custom_target(copy_falco_plugins)
add_custom_command(TARGET copy_falco_plugins
- # LOGRAY_PLUGIN_DIR is versioned. Place our Falco plugins alongsided it.
- COMMAND ${CMAKE_COMMAND} -E make_directory ${LOGRAY_PLUGIN_DIR}/../falco
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FALCO_PLUGINS} ${LOGRAY_PLUGIN_DIR}/../falco
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${LOGRAY_PLUGIN_DIR}/falco
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FALCO_PLUGINS} ${LOGRAY_PLUGIN_DIR}/falco
VERBATIM
)
add_dependencies(logray copy_falco_plugins)
${APPLE_CORE_FOUNDATION_LIBRARY}
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
${WIN_WS2_32_LIBRARY}
- ${M_LIBRARIES}
)
set(tshark_FILES
$<TARGET_OBJECTS:capture_opts>
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
${WIN_WS2_32_LIBRARY}
${SPEEXDSP_LIBRARIES}
- ${M_LIBRARIES}
${GCRYPT_LIBRARIES}
)
set(sharkd_FILES
if(MAKENSIS_EXECUTABLE)
add_subdirectory( packaging/nsis EXCLUDE_FROM_ALL )
- ADD_NSIS_UNINSTALLER_TARGETS()
ADD_NSIS_PACKAGE_TARGETS()
endif()
COMMAND ${ASCIIDOCTOR_EXECUTABLE}
--backend html
--out-file ${_wireshark_read_me_first}
- --attribute include-dir=${CMAKE_SOURCE_DIR}/docbook
+ --attribute include-dir=${CMAKE_SOURCE_DIR}/doc
--attribute min-macos-version=${MIN_MACOS_VERSION}
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Wireshark_read_me_first.adoc
DEPENDS
COMMAND ${ASCIIDOCTOR_EXECUTABLE}
--backend html
--out-file ${_wireshark_donate}
- --attribute include-dir=${CMAKE_SOURCE_DIR}/docbook
+ --attribute include-dir=${CMAKE_SOURCE_DIR}/doc
--attribute min-macos-version=${MIN_MACOS_VERSION}
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Donate_to_the_Wireshark_Foundation.adoc
DEPENDS
COMMAND ${ASCIIDOCTOR_EXECUTABLE}
--backend html
--out-file ${_wireshark_dsym_installation}
- --attribute include-dir=${CMAKE_SOURCE_DIR}/docbook
+ --attribute include-dir=${CMAKE_SOURCE_DIR}/doc
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Wireshark_dsym_installation.adoc
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Wireshark_dsym_installation.adoc
COMMAND ${ASCIIDOCTOR_EXECUTABLE}
--backend html
--out-file ${_logray_read_me_first}
- --attribute include-dir=${CMAKE_SOURCE_DIR}/docbook
+ --attribute include-dir=${CMAKE_SOURCE_DIR}/doc
--attribute min-macos-version=${MIN_MACOS_VERSION}
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Logray_read_me_first.adoc
DEPENDS
COMMAND ${ASCIIDOCTOR_EXECUTABLE}
--backend html
--out-file ${_logray_dsym_installation}
- --attribute include-dir=${CMAKE_SOURCE_DIR}/docbook
+ --attribute include-dir=${CMAKE_SOURCE_DIR}/doc
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Logray_dsym_installation.adoc
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/packaging/macosx/Logray_dsym_installation.adoc
GROUP_READ
WORLD_READ
DESTINATION
- ${CMAKE_INSTALL_DATADIR}
+ ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
)
+if (BUILD_logray)
+ install(
+ FILES
+ ${LOG_INSTALL_FILES}
+ PERMISSIONS
+ OWNER_WRITE OWNER_READ
+ GROUP_READ
+ WORLD_READ
+ DESTINATION
+ ${CMAKE_INSTALL_DATADIR}/${LOG_PROJECT_NAME}
+ )
+endif()
+
install(
FILES
${DOC_FILES}
RENAME org.wireshark.Logray.svg)
endif()
-install(
- FILES
- "${CMAKE_BINARY_DIR}/wireshark.pc"
- DESTINATION
- ${CMAKE_INSTALL_LIBDIR}/pkgconfig
- COMPONENT
- "Development"
+install(FILES "${CMAKE_BINARY_DIR}/resources/wireshark.pc"
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+ COMPONENT "Development"
EXCLUDE_FROM_ALL
)
DIRECTORY
${INSTALL_DIRS}
DESTINATION
- ${CMAKE_INSTALL_DATADIR}
+ ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
FILE_PERMISSIONS
OWNER_WRITE OWNER_READ
GROUP_READ
PATTERN "Makefile.*" EXCLUDE
)
+if (BUILD_logray)
+ install(
+ DIRECTORY
+ ${LOG_INSTALL_DIRS}
+ DESTINATION
+ ${CMAKE_INSTALL_DATADIR}/${LOG_PROJECT_NAME}
+ FILE_PERMISSIONS
+ OWNER_WRITE OWNER_READ
+ GROUP_READ
+ WORLD_READ
+ DIRECTORY_PERMISSIONS
+ OWNER_EXECUTE OWNER_WRITE OWNER_READ
+ GROUP_EXECUTE GROUP_READ
+ WORLD_EXECUTE WORLD_READ
+ PATTERN ".git" EXCLUDE
+ PATTERN ".svn" EXCLUDE
+ PATTERN "Makefile.*" EXCLUDE
+ )
+endif()
+
if(WIN32 AND NOT USE_MSYSTEM)
# Note: CMake export mechanism misbehaves with a '.' in the
# path (incorrect relative path computation).