CMake Configuration
This page documents several the CMake Configuration options
Backend
Section titled “Backend”Define the backend to use. By default, the most appropriate for your platform will be used.
The following options are available:
- Default
- Qt5
- Qt6
- WebKit
- WebKitGtk
- WebView2
set(saucer_backend "Qt6")
Serializer
Section titled “Serializer”Define the serializer to use. By default, a serializer based on glaze
will be used.
The following options are available:
- Glaze
- Rflpp
- None (bring your own)
set(saucer_serializer "Rflpp")
WebView2 Version
Section titled “WebView2 Version”This option defines which version of the WebView2 NuGet-Package will be used.
set(saucer_webview2_version "1.0.2783-prerelease")
MacOS Private API
Section titled “MacOS Private API”Define whether or not private MacOS APIs may be used. This is enabled by default.
Disabling will have the following consequences:
- Custom Schemes will not be treated as secure
- The MediaDevices JavaScript API may not be available
- Dev-Tools will not be available
webview::set_background()
will cease to functionnavigation::redirection()
will always returnfalse
navigation::user_initiated()
will always returnfalse
set(saucer_private_webkit OFF)
MSVC Mutex
Section titled “MSVC Mutex”Version 17.10
of the Microsoft STL introduced constexpr
mutex constructors (see changelog).
This change includes the following note:
Note: Programs that aren’t following the documented restrictions on binary compatibility may encounter null dereferences in mutex machinery.
This change is known to have caused crashes in the Java Bindings for saucer. It is thus recommended to enable this option when developing language bindings for languages that ship their own Visual C++ Runtime.
set(saucer_msvc_hack ON)