epan/dissectors/packet-dcerpc.* move ndr_pointer stuff to dcerpc_info and avoid globa...
[metze/wireshark/wip.git] / CMakeLists.txt
index 50d696e6e28979d96f12b9c88c1618d0e10eb378..dd9b78c395404a1596fc290af6a474b1cad00dc9 100644 (file)
@@ -69,8 +69,8 @@ set(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT
 
 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 )
@@ -232,8 +232,8 @@ if(WIN32)
        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
@@ -289,12 +289,6 @@ if(WIN32 AND NOT USE_MSYSTEM)
        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)
 
@@ -303,9 +297,9 @@ set(PROJECT_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")
 # 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.
@@ -1201,6 +1195,10 @@ find_package(GCRYPT "1.8.0" REQUIRED)
 # 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)
@@ -1215,7 +1213,7 @@ if(BUILD_sshdump OR BUILD_ciscodump OR BUILD_wifidump)
 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)
@@ -1248,6 +1246,7 @@ if(BUILD_wireshark OR BUILD_logray)
                                Widgets
                                Concurrent
                                Core5Compat
+                               DBus
                        OPTIONAL_COMPONENTS
                                Multimedia
                )
@@ -1281,6 +1280,10 @@ if(BUILD_wireshark OR BUILD_logray)
                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})
@@ -1294,11 +1297,11 @@ if(BUILD_wireshark OR BUILD_logray)
                        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)
@@ -1319,6 +1322,9 @@ if(BUILD_wireshark OR BUILD_logray)
        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)
@@ -1366,9 +1372,9 @@ ws_find_package(NGHTTP3 ENABLE_NGHTTP3 HAVE_NGHTTP3)
 # 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()
 
@@ -1499,13 +1505,13 @@ if (QT_FOUND)
                # 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)
@@ -1587,11 +1593,16 @@ include( UseCheckAPI )
 # 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)
        #
@@ -1714,6 +1725,7 @@ if(ENABLE_PLUGINS)
                plugins/epan/wimax
                plugins/epan/wimaxasncp
                plugins/epan/wimaxmacphy
+               plugins/epan/dfilter/ipaddr
                plugins/wiretap/usbdump
                plugins/codecs/G711
                plugins/codecs/l16_mono
@@ -1817,12 +1829,6 @@ configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h
 
 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}")
@@ -1842,8 +1848,8 @@ set(CFG_OUT_FILES
        resources/libwiretap.rc
        resources/libwsutil.rc
        resources/wireshark.exe.manifest
+       resources/wireshark.pc
        resources/wireshark.rc
-       wireshark.pc
 )
 
 if(BUILD_logray)
@@ -1913,7 +1919,7 @@ set_package_properties(LZ4 PROPERTIES
 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"
@@ -1997,9 +2003,6 @@ if(WIN32)
        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
@@ -2047,7 +2050,8 @@ set(TSHARK_TAP_SRC
 
 )
 
-# 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
@@ -2057,11 +2061,12 @@ set(INSTALL_DIRS
        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
@@ -2075,6 +2080,10 @@ set(DOC_FILES
 )
 
 if (BUILD_logray)
+       set(LOG_INSTALL_DIRS
+               resources/share/logray/profiles
+       )
+
        set(LOG_INSTALL_FILES
                docbook/ws.css
                resources/share/logray/colorfilters
@@ -2205,9 +2214,10 @@ if(USE_REPOSITORY)
                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}")
@@ -2301,6 +2311,9 @@ if(USE_REPOSITORY)
        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.
@@ -2356,7 +2369,7 @@ endif()
 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})
@@ -2387,21 +2400,26 @@ foreach(_install_file ${INSTALL_FILES} ${DOC_FILES})
        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)
@@ -2530,12 +2548,28 @@ add_custom_command(
                "${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}
@@ -2921,9 +2955,8 @@ endif()
 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)
@@ -2986,7 +3019,6 @@ if(BUILD_tshark)
                ${APPLE_CORE_FOUNDATION_LIBRARY}
                ${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
                ${WIN_WS2_32_LIBRARY}
-               ${M_LIBRARIES}
        )
        set(tshark_FILES
                $<TARGET_OBJECTS:capture_opts>
@@ -3060,7 +3092,6 @@ if(BUILD_sharkd)
                ${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
                ${WIN_WS2_32_LIBRARY}
                ${SPEEXDSP_LIBRARIES}
-               ${M_LIBRARIES}
                ${GCRYPT_LIBRARIES}
        )
        set(sharkd_FILES
@@ -3350,7 +3381,6 @@ if(WIN32)
 
        if(MAKENSIS_EXECUTABLE)
                add_subdirectory( packaging/nsis EXCLUDE_FROM_ALL )
-               ADD_NSIS_UNINSTALLER_TARGETS()
                ADD_NSIS_PACKAGE_TARGETS()
        endif()
 
@@ -3535,7 +3565,7 @@ if(ENABLE_APPLICATION_BUNDLE AND BUILD_wireshark)
        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
@@ -3549,7 +3579,7 @@ if(ENABLE_APPLICATION_BUNDLE AND BUILD_wireshark)
        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
@@ -3563,7 +3593,7 @@ if(ENABLE_APPLICATION_BUNDLE AND BUILD_wireshark)
        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
@@ -3603,7 +3633,7 @@ if(ENABLE_APPLICATION_BUNDLE AND BUILD_logray)
        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
@@ -3617,7 +3647,7 @@ if(ENABLE_APPLICATION_BUNDLE AND BUILD_logray)
        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
@@ -3932,9 +3962,22 @@ install(
                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}
@@ -4027,13 +4070,9 @@ if(BUILD_logray AND QT_FOUND AND NOT APPLE AND (NOT WIN32 OR USE_MSYSTEM))
                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
 )
 
@@ -4041,7 +4080,7 @@ install(
        DIRECTORY
                ${INSTALL_DIRS}
        DESTINATION
-               ${CMAKE_INSTALL_DATADIR}
+               ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
        FILE_PERMISSIONS
                OWNER_WRITE OWNER_READ
                GROUP_READ
@@ -4055,6 +4094,26 @@ install(
        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).