LATER packet-kerberos: ticket_checksum tmpvtb...
[wireshark-sm.git] / CMakeOptions.txt
blobdc591582d09713e130289afc931721bda04dc77e
1 # Build options for use by CMake
3 option(BUILD_wireshark     "Build Wireshark" ON)
4 option(BUILD_stratoshark   "Build Stratoshark" OFF)
5 if(BUILD_wireshark OR BUILD_stratoshark)
6         option(USE_qt6     "Use Qt6 (preferred) instead of Qt5" ON)
7 endif()
8 option(BUILD_tshark        "Build tshark" ON)
9 option(BUILD_tfshark       "Build tfshark" OFF)
10 option(BUILD_rawshark      "Build rawshark" ON)
11 option(BUILD_dumpcap       "Build dumpcap" ON)
12 option(BUILD_text2pcap     "Build text2pcap" ON)
13 option(BUILD_mergecap      "Build mergecap" ON)
14 option(BUILD_reordercap    "Build reordercap" ON)
15 option(BUILD_editcap       "Build editcap" ON)
16 option(BUILD_capinfos      "Build capinfos" ON)
17 option(BUILD_captype       "Build captype" ON)
18 option(BUILD_randpkt       "Build randpkt" ON)
19 option(BUILD_dftest        "Build dftest" ON)
20 option(BUILD_corbaidl2wrs  "Build corbaidl2wrs" OFF)
21 option(BUILD_dcerpcidl2wrs "Build dcerpcidl2wrs" ON)
22 option(BUILD_xxx2deb       "Build xxx2deb" OFF)
24 option(BUILD_androiddump   "Build androiddump" ON)
25 option(BUILD_sshdump       "Build sshdump" ON)
26 option(BUILD_ciscodump     "Build ciscodump" ON)
27 option(BUILD_dpauxmon      "Build dpauxmon" ON)
28 option(BUILD_randpktdump   "Build randpktdump" ON)
29 option(BUILD_wifidump      "BUild wifidump" ON)
30 if(WIN32 AND NOT MINGW)
31         option(BUILD_etwdump       "Build etwdump" ON)
32 else()
33         option(BUILD_etwdump       "Build etwdump" OFF)
34 endif()
36 if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
37         option(BUILD_sdjournal   "Build sdjournal" ON)
38 else()
39         option(BUILD_sdjournal   "Build sdjournal" OFF)
40 endif()
41 option(BUILD_udpdump       "Build udpdump" ON)
42 option(BUILD_falcodump     "Build falcodump" OFF)
44 option(BUILD_sharkd        "Build sharkd" ON)
45 option(BUILD_mmdbresolve   "Build MaxMind DB resolver" ON)
46 option(BUILD_fuzzshark     "Build fuzzshark" OFF)
48 option(ENABLE_WERROR     "Treat warnings as errors" ON)
49 # Debugging is enabled for "Debug" build type.
50 option(ENABLE_DEBUG      "Enable debugging for all build configurations" OFF)
51 option(ENABLE_DEBUG_UTF_8  "Enable UTF-8 sanity checks (requires ENABLE_DEBUG)" ON)
52 option(ENABLE_DEBUG_A2W  "Enable line directive from .cnf file" OFF)
53 # Assertions are enabled for "Debug" and "RelWithDebInfo" build types.
54 option(ENABLE_ASSERT     "Enable assertions for all build configurations" OFF)
56 option(ENABLE_CCACHE     "Speed up compiling and linking using ccache if possible" OFF)
57 option(DISABLE_FRAME_LARGER_THAN_WARNING "Disable warning if the size of a function frame is large" OFF)
58 option(EXTCAP_ANDROIDDUMP_LIBPCAP    "Build androiddump using libpcap" OFF)
59 option(ENABLE_TODO_WARNINGS "Enable compiler warnings that are yet to be fixed" OFF)
60 option(ENABLE_PEDANTIC_WARNINGS "Enable pedantic or unfixable compiler warnings (noisy)" OFF)
61 option(ENABLE_CODE_ANALYSIS "Enable the compiler's static analyzer if possible" OFF)
62 option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
63 option(ENABLE_LSAN "Enable LeakSanitizer (LSAN) for debugging (less overhead than ASAN)" OFF)
64 option(ENABLE_TSAN "Enable ThreadSanitizer (TSan) for debugging" OFF)
65 option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
66 option(ENABLE_FUZZER "Enable libFuzzer instrumentation for use with fuzzshark" OFF)
67 option(ENABLE_CHECKHF_CONFLICT "Enable hf conflict check for debugging (start-up may be slower)" OFF)
69 if(CMAKE_GENERATOR STREQUAL "Ninja")
70         option(ENABLE_COMPILER_COLOR_DIAGNOSTICS "Always enable the compiler's color diagnostic output" ON)
71 else()
72         option(ENABLE_COMPILER_COLOR_DIAGNOSTICS "Always enable the compiler's color diagnostic output" OFF)
73 endif()
75 option(ENABLE_LTO "Use Link Time Optimization (release configuration only)" OFF)
77 if(WIN32)
78         option(ENABLE_VLD "Enable Visual Leak Detect in Debug configuration" OFF)
79 endif()
81 option(ENABLE_PCAP       "Enable libpcap support (required for capturing)" ON)
82 option(ENABLE_STATIC            "Build Wireshark libraries statically" OFF)
83 option(USE_STATIC               "Always link statically with external libraries" OFF)
84 option(ENABLE_PLUGINS           "Build with plugins" ON)
85 option(ENABLE_PLUGIN_IFDEMO     "Build with plugin interface demo" OFF)
87 option(ENABLE_ZLIB       "Build with zlib compression support" ON)
88 option(ENABLE_ZLIBNG     "Build with zlib-ng compression support" ON)
89 option(ENABLE_MINIZIP    "Build with zip file compression support" ON)
90 option(ENABLE_MINIZIPNG  "Build with zip file compression support" ON)
91 option(ENABLE_LZ4        "Build with LZ4 compression support" ON)
92 option(ENABLE_BROTLI     "Build with brotli compression support" ON)
93 option(ENABLE_SNAPPY     "Build with Snappy compression support" ON)
94 option(ENABLE_ZSTD       "Build with Facebook zstd compression support" ON)
95 option(ENABLE_NGHTTP2    "Build with HTTP/2 header decompression support" ON)
96 option(ENABLE_NGHTTP3    "Build with HTTP/3 header decompression support" ON)
97 option(ENABLE_LUA        "Build with Lua dissector support" ON)
98 option(ENABLE_SMI        "Build with libsmi snmp support" ON)
99 option(ENABLE_GNUTLS     "Build with RSA decryption support" ON)
100 if(WIN32 AND USE_REPOSITORY)
101         option(ENABLE_WINSPARKLE "Enable automatic updates using WinSparkle" ON)
102 endif()
103 if (NOT WIN32)
104         option(ENABLE_CAP        "Build with Posix capabilities support" ON)
105 endif()
106 if(UNIX)
107         # Libnl is Linux-specific.
108         if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
109                 set(_enable_libnl ON)
110         endif()
111         option(ENABLE_NETLINK    "Build with libnl support" ${_enable_libnl})
112 endif()
113 option(ENABLE_KERBEROS   "Build with Kerberos support" ON)
114 option(ENABLE_SBC        "Build with SBC Codec support in RTP Player" ON)
115 option(ENABLE_SPANDSP    "Build with G.722/G.726 codecs support in RTP Player" ON)
116 option(ENABLE_BCG729     "Build with G.729 codec support in RTP Player" ON)
117 option(ENABLE_AMRNB      "Build with AMRNB codec support in RTP Player" ON)
118 option(ENABLE_ILBC       "Build with iLBC codec support in RTP Player" ON)
119 option(ENABLE_LIBXML2    "Build with libxml2 support" ON)
120 option(ENABLE_OPUS       "Build with opus support" ON)
121 option(ENABLE_SINSP      "Build with libsinsp+libscap support" ON)
123 option(FETCH_lua         "Download and build Lua" OFF)
125 # How to install
126 set(DUMPCAP_INSTALL_OPTION   "normal" CACHE STRING "Permissions to install")
127 set_property(CACHE DUMPCAP_INSTALL_OPTION PROPERTY STRINGS "normal" "suid" "capabilities")
129 if(UNIX)
130         option(ENABLE_DUMPCAP_GROUP "Install dumpcap with group ownership and permissions (default \"wireshark\")" OFF)
131         set(DUMPCAP_INSTALL_GROUP "wireshark" CACHE STRING "Group name for dumpcap (must exist)")
132 endif()
134 if(APPLE)
135         option(ENABLE_APPLICATION_BUNDLE "Build a macOS application bundle (Wireshark.app)" ON)
136         option(ENABLE_SPARKLE "Enable automatic updates using Sparkle" ON)
137 endif()
139 if(WIN32)
140         # Enable signing of NSIS installer by default only if we have 'sign-wireshark.bat' on the path
141         # of the host system.
142         set(_enable_signed_nsis False)
143         if(CMAKE_HOST_WIN32)
144                 find_file(SIGN_WIRESHARK_BAT "sign-wireshark.bat")
145                 if (SIGN_WIRESHARK_BAT)
146                         set(_enable_signed_nsis True)
147                 endif()
148         endif()
149         option(ENABLE_SIGNED_NSIS         "Enable the code signing step of the NSIS installer build" ${_enable_signed_nsis})
151         # Advanced options for developers to work-around limitations in the build
152         # when cross-compiling to Windows.
153         option(SKIP_NSIS_QT_DLLS    "Skip deploying Qt runtime DLLs with installer" OFF)
154         mark_as_advanced(SKIP_NSIS_QT_DLLS)
155 endif()