Skip to main content

CMake Configuration

There are several configurable CMake options. I'll quickly go over the most important here.

Backend

Example: Use Qt6 backend
set(saucer_backend "Qt6")

Define the backend to use. By default, the most appropriate for your platform will be used.

Serializer

Example: Use Rflpp serializer
set(saucer_serializer "Rflpp")

Define the serializer to use, must be one of: Glaze, Rflpp or None. See interoperability for more information.

MacOS Private API

Example: Disable Private API usage on MacOS
set(saucer_private_webkit OFF)

Disable private API usage for MacOS. You may want to disable this when submitting your application to the AppStore.
Doing so will have the following consequences:

  • Full-Screen support will be removed
  • Dev-Tools will be disabled
  • Custom Schemes will no longer be treated as secure

MSVC-Hack

Example: Enable MSVC Hack
set(saucer_msvc_hack ON)
note

You may require this option when developing language bindings.

Fixes crashes related to constexpr mutex constructor on Windows.
See the VS 2022 17.10 entry in the Microsoft/STL Changelog.

Modules

Example: Disable Modules
set(saucer_modules OFF)

Enable module support for saucer. While all the headers required to use modules are always included, this option is used to ensure proper library and header visibility so that you can use the underlying platform internals without issues.

WebView2 Version

Example: Custom WebView2 version
set(saucer_webview2_version "1.0.2783-prerelease")

Explicitly define the version of the WebView2 NuGet package to use.