Skip to content

Build: Configure

Lars Toenning edited this page Jul 19, 2025 · 2 revisions

The build configuration can be modified by inheriting from the dev-debug profile within a CMakeUserPresets.json.

  1. Create a CMakeUserPresets.json within the project directory.
  2. Add the following template
{
  "version": 6,
  "configurePresets": [
    {
      "name": "dev-build-own",
      "generator": "Ninja",
      "inherits": "dev-debug",
      "cacheVariables": {

      }
    }
  ]
}
  1. Change the generator if you use a different generator.
  2. Add entries to cacheVariables to change the configuration. A list of possible entries is described below. Example:
      "cacheVariables": {
           "SWIFT_BUILD_UNIT_TESTS": "ON",
      }
  1. Within your IDE (or command line) select and use the new profile (here dev-build-own)

Configuration Options

The following configuration options are available (only options relevant for developers are listed):

General

  • CMAKE_BUILD_TYPE: Default CMake variable. Defaults to Debug. Can for example be set to Release or RelWithDebInfo
  • CMAKE_INSTALL_PREFIX: Default CMake variable. Path to where swift should be installed. Only required for deployment.
  • SWIFT_BUILD_UNIT_TESTS: Should unittests be built? ON/OFF
  • SWIFT_BUILD_SAMPLES: Should samples be built? ON or OFF
  • SWIFT_BUILD_DOCUMENTATION: Should documentation be built? ON or OFF
  • SWIFT_VATSIM_SUPPORT: Build with VATSIM support. Requires that VATSIM_AUTH_PATH is set.
  • SWIFT_DEV_X_PLANE_PLUGINS_DIR: X-Plane plugin directory that is used by the copy_xswiftbus target to automatically copy xswiftbus to X-Plane. Should point to the X-Plane directory, e.g. ../X-Plane 11/Resources/plugins

Plugins

  • SWIFT_BUILD_P3D_PLUGIN: Should the P3D plugin be built? ON or OFF. Only available on Windows. This option is currently not available for the public.
  • SWIFT_BUILD_MSFS_PLUGIN: Should the MSFS plugin be built? ON or OFF. Only available on Windows. This option is currently not available for the public.
  • SWIFT_BUILD_MSFS2024_PLUGIN: Should the MSFS 2024 plugin be built? ON or OFF. Only available on Windows. This option is currently not available for the public.
  • SWIFT_BUILD_XPLANE_PLUGIN: Should the X-Plane plugin be built? ON or OFF
  • SWIFT_BUILD_XSWIFTBUS: Should xswiftbus be built? ON or OFF. Requires that XP_SDK_PATH is set
  • SWIFT_BUILD_FLIGHTGEAR_PLUGIN: Should the FlightGear plugin be built? ON or OFF
  • SWIFT_BUILD_EMULATED_PLUGIN: Should the Emulated plugin be built? ON or OFF

Dependency paths

  • VATSIM_AUTH_PATH: Path to the VATSIM Auth main directory (currently not available to the public! For internal developers: should point to the main folder of the externals repository)
  • XP_SDK_PATH: Path to the X-Plane SDK available for download here. Currently, version 3.0.1 is used. This variable should point to the folder that includes the CHeaders, Delphi and Libraries directory.
Clone this wiki locally