Revert "TODO: smb2: simplify preauth_hash calculation..."
[wireshark-sm.git] / CMakeOptions.txt
blobd639d22036945bb33a8124c099cba612e0c8c67a
1 # Build options for use by CMake
3 option(BUILD_wireshark     "Build Wireshark" ON)
4 option(BUILD_logray        "Build Logray" OFF)
5 if(BUILD_wireshark OR BUILD_logray)
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_TSAN "Enable ThreadSanitizer (TSan) for debugging" OFF)
64 option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
65 option(ENABLE_FUZZER "Enable libFuzzer instrumentation for use with fuzzshark" OFF)
66 option(ENABLE_CHECKHF_CONFLICT "Enable hf conflict check for debugging (start-up may be slower)" OFF)
68 if(CMAKE_GENERATOR STREQUAL "Ninja")
69         option(ENABLE_COMPILER_COLOR_DIAGNOSTICS "Always enable the compiler's color diagnostic output" ON)
70 else()
71         option(ENABLE_COMPILER_COLOR_DIAGNOSTICS "Always enable the compiler's color diagnostic output" OFF)
72 endif()
74 option(ENABLE_LTO "Use Link Time Optimization (release configuration only)" OFF)
76 if(WIN32)
77         option(ENABLE_VLD "Enable Visual Leak Detect in Debug configuration" OFF)
78 endif()
80 option(ENABLE_PCAP       "Enable libpcap support (required for capturing)" ON)
82 # AirPcap support is available only on Windows.  It might be nice to have it
83 # check whether the AirPcap SDK is available, and turn AirPcap support on
84 # only if it is.
86 if(WIN32)
87         if(MINGW)
88                 # AirPcap SDK is not widely available or supported with MinGW.
89                 set(_enable_airpcap OFF)
90         else()
91                 set(_enable_airpcap ON)
92         endif()
93         option(ENABLE_AIRPCAP    "Enable AirPcap support" ${_enable_airpcap})
94 endif()
95 option(ENABLE_STATIC            "Build Wireshark libraries statically" OFF)
96 option(USE_STATIC               "Always link statically with external libraries" OFF)
97 option(ENABLE_PLUGINS           "Build with plugins" ON)
98 option(ENABLE_PLUGIN_IFDEMO     "Build with plugin interface demo" OFF)
100 option(ENABLE_ZLIB       "Build with zlib compression support" ON)
101 option(ENABLE_MINIZIP    "Build with zip file compression support" ON)
102 option(ENABLE_LZ4        "Build with LZ4 compression support" ON)
103 option(ENABLE_BROTLI     "Build with brotli compression support" ON)
104 option(ENABLE_SNAPPY     "Build with Snappy compression support" ON)
105 option(ENABLE_ZSTD       "Build with Facebook zstd compression support" ON)
106 option(ENABLE_NGHTTP2    "Build with HTTP/2 header decompression support" ON)
107 option(ENABLE_NGHTTP3    "Build with HTTP/3 header decompression support" ON)
108 option(ENABLE_LUA        "Build with Lua dissector support" ON)
109 option(ENABLE_SMI        "Build with libsmi snmp support" ON)
110 option(ENABLE_GNUTLS     "Build with RSA decryption support" ON)
111 if(WIN32 AND USE_REPOSITORY)
112         option(ENABLE_WINSPARKLE "Enable automatic updates using WinSparkle" ON)
113 endif()
114 if (NOT WIN32)
115         option(ENABLE_CAP        "Build with Posix capabilities support" ON)
116 endif()
117 if(UNIX)
118         # Libnl is Linux-specific.
119         if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
120                 set(_enable_libnl ON)
121         endif()
122         option(ENABLE_NETLINK    "Build with libnl support" ${_enable_libnl})
123 endif()
124 option(ENABLE_KERBEROS   "Build with Kerberos support" ON)
125 option(ENABLE_SBC        "Build with SBC Codec support in RTP Player" ON)
126 option(ENABLE_SPANDSP    "Build with G.722/G.726 codecs support in RTP Player" ON)
127 option(ENABLE_BCG729     "Build with G.729 codec support in RTP Player" ON)
128 option(ENABLE_AMRNB      "Build with AMRNB codec support in RTP Player" ON)
129 option(ENABLE_ILBC       "Build with iLBC codec support in RTP Player" ON)
130 option(ENABLE_LIBXML2    "Build with libxml2 support" ON)
131 option(ENABLE_OPUS       "Build with opus support" ON)
132 option(ENABLE_SINSP      "Build with libsinsp+libscap support" ON)
134 option(FETCH_lua         "Download and build Lua" OFF)
136 # How to install
137 set(DUMPCAP_INSTALL_OPTION   "normal" CACHE STRING "Permissions to install")
138 set_property(CACHE DUMPCAP_INSTALL_OPTION PROPERTY STRINGS "normal" "suid" "capabilities")
140 if(UNIX)
141         option(ENABLE_DUMPCAP_GROUP "Install dumpcap with group ownership and permissions (default \"wireshark\")" OFF)
142         set(DUMPCAP_INSTALL_GROUP "wireshark" CACHE STRING "Group name for dumpcap (must exist)")
143 endif()
145 if(APPLE)
146         option(ENABLE_APPLICATION_BUNDLE "Build a macOS application bundle (Wireshark.app)" ON)
147         option(ENABLE_SPARKLE "Enable automatic updates using Sparkle" ON)
148 endif()
150 if(WIN32)
151         # Enable signing of NSIS installer by default only if we have 'sign-wireshark.bat' on the path
152         # of the host system.
153         set(_enable_signed_nsis False)
154         if(CMAKE_HOST_WIN32)
155                 find_file(SIGN_WIRESHARK_BAT "sign-wireshark.bat")
156                 if (SIGN_WIRESHARK_BAT)
157                         set(_enable_signed_nsis True)
158                 endif()
159         endif()
160         option(ENABLE_SIGNED_NSIS         "Enable the code signing step of the NSIS installer build" ${_enable_signed_nsis})
162         # Advanced options for developers to work-around limitations in the build
163         # when cross-compiling to Windows.
164         option(SKIP_NSIS_QT_DLLS    "Skip deploying Qt runtime DLLs with installer" OFF)
165         mark_as_advanced(SKIP_NSIS_QT_DLLS)
166 endif()