2010-05-15 20:41:53 +00:00
|
|
|
# Build options for use by CMake
|
|
|
|
|
2014-08-28 23:48:53 +00:00
|
|
|
option(BUILD_wireshark "Build Wireshark" ON)
|
2022-06-30 16:45:49 +00:00
|
|
|
option(BUILD_logray "Build Logray" OFF)
|
|
|
|
if(BUILD_wireshark OR BUILD_logray)
|
2022-08-22 07:57:46 +00:00
|
|
|
if(NOT DEFINED ENV{WIRESHARK_BUILD_WITH_QT5})
|
2022-05-20 22:23:50 +00:00
|
|
|
option(USE_qt6 "Use Qt6 instead of Qt5" ON)
|
|
|
|
else()
|
|
|
|
option(USE_qt6 "Use Qt6 instead of Qt5" OFF)
|
|
|
|
endif()
|
2021-11-18 00:29:59 +00:00
|
|
|
endif()
|
2014-08-28 23:48:53 +00:00
|
|
|
option(BUILD_tshark "Build tshark" ON)
|
2017-08-10 17:20:30 +00:00
|
|
|
option(BUILD_tfshark "Build tfshark" OFF)
|
2014-08-28 23:48:53 +00:00
|
|
|
option(BUILD_rawshark "Build rawshark" ON)
|
|
|
|
option(BUILD_dumpcap "Build dumpcap" ON)
|
|
|
|
option(BUILD_text2pcap "Build text2pcap" ON)
|
|
|
|
option(BUILD_mergecap "Build mergecap" ON)
|
|
|
|
option(BUILD_reordercap "Build reordercap" ON)
|
|
|
|
option(BUILD_editcap "Build editcap" ON)
|
|
|
|
option(BUILD_capinfos "Build capinfos" ON)
|
|
|
|
option(BUILD_captype "Build captype" ON)
|
|
|
|
option(BUILD_randpkt "Build randpkt" ON)
|
|
|
|
option(BUILD_dftest "Build dftest" ON)
|
2017-08-10 17:20:30 +00:00
|
|
|
option(BUILD_corbaidl2wrs "Build corbaidl2wrs" OFF)
|
|
|
|
option(BUILD_dcerpcidl2wrs "Build dcerpcidl2wrs" ON)
|
|
|
|
option(BUILD_xxx2deb "Build xxx2deb" OFF)
|
2018-09-05 23:29:34 +00:00
|
|
|
|
2015-02-14 18:10:21 +00:00
|
|
|
option(BUILD_androiddump "Build androiddump" ON)
|
2015-11-19 10:30:44 +00:00
|
|
|
option(BUILD_sshdump "Build sshdump" ON)
|
2016-03-04 09:53:56 +00:00
|
|
|
option(BUILD_ciscodump "Build ciscodump" ON)
|
2018-05-03 14:12:20 +00:00
|
|
|
option(BUILD_dpauxmon "Build dpauxmon" ON)
|
2015-11-05 17:31:11 +00:00
|
|
|
option(BUILD_randpktdump "Build randpktdump" ON)
|
2022-03-08 21:38:13 +00:00
|
|
|
option(BUILD_wifidump "BUild wifidump" ON)
|
2021-07-15 01:34:52 +00:00
|
|
|
if(WIN32 AND NOT MINGW)
|
|
|
|
# XXX - I don't think building etwdump is possible with MinGW-w64 as of
|
|
|
|
# version 9.0 but I would like to be 100% certain.
|
2020-12-02 09:05:11 +00:00
|
|
|
option(BUILD_etwdump "Build etwdump" ON)
|
|
|
|
else()
|
|
|
|
option(BUILD_etwdump "Build etwdump" OFF)
|
|
|
|
endif()
|
|
|
|
|
2018-09-05 23:29:34 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
option(BUILD_sdjournal "Build sdjournal" ON)
|
|
|
|
else()
|
|
|
|
option(BUILD_sdjournal "Build sdjournal" OFF)
|
|
|
|
endif()
|
2016-02-10 14:45:45 +00:00
|
|
|
option(BUILD_udpdump "Build udpdump" ON)
|
2022-03-17 20:56:37 +00:00
|
|
|
option(BUILD_falcodump "Build falcodump" OFF)
|
2018-09-05 23:29:34 +00:00
|
|
|
|
2017-01-25 09:53:16 +00:00
|
|
|
option(BUILD_sharkd "Build sharkd" ON)
|
2018-02-09 01:20:26 +00:00
|
|
|
option(BUILD_mmdbresolve "Build MaxMind DB resolver" ON)
|
2022-03-09 18:11:25 +00:00
|
|
|
option(BUILD_fuzzshark "Build fuzzshark" OFF)
|
2010-05-15 20:41:53 +00:00
|
|
|
|
2021-12-30 01:05:57 +00:00
|
|
|
option(ENABLE_WERROR "Treat warnings as errors" ON)
|
2023-01-09 12:58:45 +00:00
|
|
|
# Debugging is enabled for "Debug" and "RelWithDebInfo" build types.
|
|
|
|
option(ENABLE_DEBUG "Enable debugging for all build configurations" OFF)
|
|
|
|
# UTF-8 debugging is enabled for "Debug" and "RelWithDebInfo" build types.
|
|
|
|
option(ENABLE_DEBUG_UTF_8 "Enable UTF-8 sanity checks for all build configurations" OFF)
|
2022-11-29 16:15:35 +00:00
|
|
|
option(ENABLE_DEBUG_A2W "Enable line directive from .cnf file" OFF)
|
2022-09-26 21:39:01 +00:00
|
|
|
|
2021-12-30 01:05:57 +00:00
|
|
|
option(ENABLE_CCACHE "Speed up compiling and linking using ccache if possible" OFF)
|
2017-09-16 10:47:30 +00:00
|
|
|
option(DISABLE_FRAME_LARGER_THAN_WARNING "Disable warning if the size of a function frame is large" OFF)
|
2015-02-14 18:10:21 +00:00
|
|
|
option(EXTCAP_ANDROIDDUMP_LIBPCAP "Build androiddump using libpcap" OFF)
|
2022-11-12 21:22:34 +00:00
|
|
|
option(ENABLE_TODO_WARNINGS "Enable compiler warnings that are yet to be fixed" OFF)
|
|
|
|
option(ENABLE_PEDANTIC_WARNINGS "Enable pedantic or unfixable compiler warnings (noisy)" OFF)
|
2015-01-06 18:44:37 +00:00
|
|
|
option(ENABLE_CODE_ANALYSIS "Enable the compiler's static analyzer if possible" OFF)
|
2016-03-24 18:22:28 +00:00
|
|
|
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
2017-11-20 20:44:17 +00:00
|
|
|
option(ENABLE_TSAN "Enable ThreadSanitizer (TSan) for debugging" OFF)
|
2017-05-15 22:09:43 +00:00
|
|
|
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
|
2018-10-16 22:47:20 +00:00
|
|
|
option(ENABLE_FUZZER "Enable libFuzzer instrumentation for use with fuzzshark" OFF)
|
2016-03-24 18:22:28 +00:00
|
|
|
option(ENABLE_CHECKHF_CONFLICT "Enable hf conflict check for debugging (start-up may be slower)" OFF)
|
2015-01-06 18:44:37 +00:00
|
|
|
|
2021-04-12 19:13:02 +00:00
|
|
|
if(CMAKE_GENERATOR STREQUAL "Ninja")
|
|
|
|
option(ENABLE_COMPILER_COLOR_DIAGNOSTICS "Always enable the compiler's color diagnostic output" ON)
|
|
|
|
else()
|
|
|
|
option(ENABLE_COMPILER_COLOR_DIAGNOSTICS "Always enable the compiler's color diagnostic output" OFF)
|
|
|
|
endif()
|
|
|
|
|
2022-04-22 00:19:56 +00:00
|
|
|
option(ENABLE_LTO "Use Link Time Optimization (release configuration only)" OFF)
|
2020-06-28 15:42:43 +00:00
|
|
|
|
2021-05-24 20:58:50 +00:00
|
|
|
if(WIN32)
|
2021-05-23 18:44:07 +00:00
|
|
|
option(ENABLE_VLD "Enable Visual Leak Detect in Debug configuration" OFF)
|
|
|
|
endif()
|
|
|
|
|
2011-08-30 11:44:21 +00:00
|
|
|
option(ENABLE_PCAP "Enable libpcap support (required for capturing)" ON)
|
2011-07-12 17:19:17 +00:00
|
|
|
#
|
2017-11-04 16:59:17 +00:00
|
|
|
# AirPcap support is available only on Windows. It might be nice to have it
|
|
|
|
# check whether the AirPcap SDK is available, and turn AirPcap support on
|
2011-07-12 17:19:17 +00:00
|
|
|
# only if it is.
|
|
|
|
#
|
2013-10-10 20:35:32 +00:00
|
|
|
if(WIN32)
|
|
|
|
option(ENABLE_AIRPCAP "Enable AirPcap support" ON)
|
|
|
|
endif()
|
2017-11-01 20:22:32 +00:00
|
|
|
option(ENABLE_STATIC "Build Wireshark libraries statically" OFF)
|
2019-04-22 16:39:52 +00:00
|
|
|
option(USE_STATIC "Always link statically with external libraries" OFF)
|
2017-11-04 16:59:17 +00:00
|
|
|
option(ENABLE_PLUGINS "Build with plugins" ON)
|
|
|
|
option(ENABLE_PLUGIN_IFDEMO "Build with plugin interface demo" OFF)
|
2010-05-15 20:41:53 +00:00
|
|
|
|
|
|
|
option(ENABLE_ZLIB "Build with zlib compression support" ON)
|
2019-07-10 22:25:45 +00:00
|
|
|
option(ENABLE_MINIZIP "Build with zip file compression support" ON)
|
2016-09-26 14:25:11 +00:00
|
|
|
option(ENABLE_LZ4 "Build with LZ4 compression support" ON)
|
2019-04-10 10:52:52 +00:00
|
|
|
option(ENABLE_BROTLI "Build with brotli compression support" ON)
|
2016-09-26 14:25:11 +00:00
|
|
|
option(ENABLE_SNAPPY "Build with Snappy compression support" ON)
|
2019-08-12 21:57:45 +00:00
|
|
|
option(ENABLE_ZSTD "Build with Facebook zstd compression support" ON)
|
2017-08-27 21:07:55 +00:00
|
|
|
option(ENABLE_NGHTTP2 "Build with HTTP/2 header decompression support" ON)
|
2013-07-23 19:50:52 +00:00
|
|
|
option(ENABLE_LUA "Build with Lua dissector support" ON)
|
|
|
|
option(ENABLE_SMI "Build with libsmi snmp support" ON)
|
2018-12-12 13:34:00 +00:00
|
|
|
option(ENABLE_GNUTLS "Build with RSA decryption support" ON)
|
2014-08-20 21:29:33 +00:00
|
|
|
if(WIN32)
|
2019-11-14 16:08:28 +00:00
|
|
|
option(ENABLE_WINSPARKLE "Enable automatic updates using WinSparkle" ON)
|
2014-08-20 21:29:33 +00:00
|
|
|
endif()
|
2017-11-18 20:16:32 +00:00
|
|
|
if (NOT WIN32)
|
|
|
|
option(ENABLE_CAP "Build with Posix capabilities support" ON)
|
|
|
|
endif()
|
2017-11-04 16:59:17 +00:00
|
|
|
if(UNIX)
|
|
|
|
# Libnl is Linux-specific.
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
set(_enable_libnl ON)
|
|
|
|
endif()
|
|
|
|
option(ENABLE_NETLINK "Build with libnl support" ${_enable_libnl})
|
2014-05-05 18:22:25 +00:00
|
|
|
endif()
|
2010-09-23 09:08:50 +00:00
|
|
|
option(ENABLE_KERBEROS "Build with Kerberos support" ON)
|
2014-06-18 19:25:12 +00:00
|
|
|
option(ENABLE_SBC "Build with SBC Codec support in RTP Player" ON)
|
2016-11-23 23:27:14 +00:00
|
|
|
option(ENABLE_SPANDSP "Build with G.722/G.726 codecs support in RTP Player" ON)
|
2017-07-26 21:23:12 +00:00
|
|
|
option(ENABLE_BCG729 "Build with G.729 codec support in RTP Player" ON)
|
2019-11-18 22:55:25 +00:00
|
|
|
option(ENABLE_ILBC "Build with iLBC codec support in RTP Player" ON)
|
2017-04-04 21:23:59 +00:00
|
|
|
option(ENABLE_LIBXML2 "Build with libxml2 support" ON)
|
2020-09-29 04:33:06 +00:00
|
|
|
option(ENABLE_OPUS "Build with opus support" ON)
|
2022-03-10 20:21:12 +00:00
|
|
|
option(ENABLE_SINSP "Build with libsinsp+libscap support" ON)
|
2018-08-25 15:58:27 +00:00
|
|
|
|
2014-01-19 00:48:22 +00:00
|
|
|
# How to install
|
|
|
|
set(DUMPCAP_INSTALL_OPTION "normal" CACHE STRING "Permissions to install")
|
2018-08-25 15:58:27 +00:00
|
|
|
set_property(CACHE DUMPCAP_INSTALL_OPTION PROPERTY STRINGS "normal" "suid" "capabilities")
|
|
|
|
|
2018-08-25 16:27:23 +00:00
|
|
|
if(UNIX)
|
|
|
|
option(ENABLE_DUMPCAP_GROUP "Install dumpcap with group ownership and permissions (default \"wireshark\")" OFF)
|
|
|
|
set(DUMPCAP_INSTALL_GROUP "wireshark" CACHE STRING "Group name for dumpcap (must exist)")
|
|
|
|
endif()
|
|
|
|
|
2014-10-09 18:37:27 +00:00
|
|
|
if(APPLE)
|
2017-04-05 19:15:27 +00:00
|
|
|
option(ENABLE_APPLICATION_BUNDLE "Build a macOS application bundle (Wireshark.app)" ON)
|
2019-11-14 16:08:28 +00:00
|
|
|
option(ENABLE_SPARKLE "Enable automatic updates using Sparkle" ON)
|
2014-10-09 18:37:27 +00:00
|
|
|
endif()
|