Building the project
Guide how to build Jazz² Resurrection.
The project requires following tools and libraries to build it successfully:
- CMake 3.15 or newer
- C++ compiler with C++17 support — any recent version of GCC, Clang and MSVC should work, MinGW and Clang-CL toolchains should be also supported
- OpenGL 3.3, OpenGL|ES 3.0 or WebGL 2.0 library (alternatively ANGLE or Mesa translation library, not required with the software renderer or on the consoles that drive their own graphics hardware directly)
- GLEW library (required only on Windows)
- GLFW or SDL2 library (not required on Android, UWP and most consoles, because these platforms use a different backend, nor by the dedicated server, which opens no window at all)
- libcurl library (not required on Emscripten and Windows, because these platforms use a different backend)
- zlib library
In addition, these libraries are recommended for an optimal experience:
- OpenAL library — audio support
- libopenmpt library — module music playback
- libogg / libvorbis library —
.oggfile support (not needed for the original assets) - libwebp library —
.webpfile support (currently not supported, not needed for the original assets) - AngelScript library — AngelScript scripting support
- liblua library — Lua scripting support (currently not supported)
It tries to download or compile all libraries automatically, but in case of build errors a manual download is necessary. Also, system-wide libraries have priority over the bundled ones, so in case of any incompatibility just install the system libraries.
How to get started
Clone the repository using any Git client, IDE, or command line:
git clone https://github.com/deathkiller/jazz2-native.git
To configure CMake, following commands can be used:
mkdir build cmake -B build -D CMAKE_BUILD_TYPE=Debug -D NCINE_CREATE_CONTENT_SYMLINK=ON
Alternatively, change CMAKE_BUILD_TYPE to Release to enable all performance optimizations and disable debugging. You can also specify build configuration parameters, which are described below. In addition, you can use the NCINE_CREATE_CONTENT_SYMLINK parameter to automatically create a symbolic link to the "Content" directory in the target directory, otherwise you would have to copy it to "build" directory manually. To start actual build of the project, use following commands:
make -j $(nproc) -C build
Everything should be built into the "build" directory and ready to go.
Two offline tools are built alongside the game on desktop platforms and skipped when cross-compiling, because both of them run on the build machine: AssetPacker converts the original game data into the layout a given platform loads, and ShaderCompiler preprocesses the .shader files into the generated headers that are committed to the repository (so the game's own build never runs it). Neither of them is installed or packaged, so builds that only produce a distributable artifact — DEDICATED_SERVER, NCINE_BUILD_FLATPAK and NCINE_BUILD_LIBRETRO — leave both of them out unless they are requested explicitly.
Building on Android
Android build requires Android SDK and NDK installed, see Get started with the NDK. Assembling APK files also requires Gradle. Path to Gradle can be supplied by GRADLE_HOME environment variable if not detected automatically. The build can be configured using a similar command as above:
mkdir build cmake -B build -D CMAKE_BUILD_TYPE=Debug \ -D NCINE_BUILD_ANDROID=ON \ -D NCINE_UNIVERSAL_APK=ON \ -D NCINE_NDK_ARCHITECTURES="arm64-v8a;armeabi-v7a"
See Platform-specific parameters for Android for more details. Then following commands can be used to build the project and assemble the APK file:
make -j $(nproc) -C build cd build gradle assembleDebug
Alternatively, replace assembleDebug with assembleRelease to create release APK file.
Building on Windows
On Windows, Visual Studio can be used. Using already included .sln is not recommended, because it requires manual configuration and doesn't support all features and parameters. Instead the project can be opened as CMake directory directly in Visual Studio, or it can be configured using a similar command as above:
mkdir build cmake -B build -D CMAKE_BUILD_TYPE=Debug -A x64 ^ -D CMAKE_SYSTEM_PROCESSOR=x64 ^ -D NCINE_CREATE_CONTENT_SYMLINK=ON
See Platform-specific parameters for Windows for more details. To build it for 32-bit operating system, use Win32 instead of x64. To change version of VS toolset, use -D CMAKE_GENERATOR_TOOLSET=… parameter. By default CMake creates a new Visual Studio .sln solution and project files in "build" directory that can be opened easily afterwards. Building with Clang-CL compiler is also possible specifying -T ClangCL parameter.
Building for Xbox (Universal Windows Platform)
The same commands can be used as for Windows, but two additional parameters must be specified to change the target:
cmake -B build -D CMAKE_BUILD_TYPE=Debug -A x64 ^ -D CMAKE_SYSTEM_PROCESSOR=x64 ^ -D CMAKE_SYSTEM_NAME=WindowsStore ^ -D CMAKE_SYSTEM_VERSION="10.0"
Additionaly, a code-signing certificate is required to create an installable .msixbundle package. See Platform-specific parameters for Universal Windows Platform for more details.
Building for iOS
The iOS build (iPhone and iPad) is cross-compiled on a Mac with Xcode installed — the Command Line Tools alone carry no iOS SDK. CMake's own iOS support is used (no toolchain file): CMAKE_SYSTEM_NAME=iOS together with the SDK (CMAKE_OSX_SYSROOT, iphoneos or iphonesimulator), the architecture (CMAKE_OSX_ARCHITECTURES, arm64 for devices; the simulator runs the Mac's own architecture) and the minimum iOS version (CMAKE_OSX_DEPLOYMENT_TARGET, 14.0 is the default and the lowest the launch screen in the Info.plist supports). None of the prebuilt dependency archives cover iOS, so SDL2, OpenAL Soft, Ogg/Vorbis and libcurl are downloaded as source and compiled as part of the build (CMake 3.18 or newer), like libopenmpt, lz4 and Zstd already are everywhere; zlib comes from the SDK.
cmake -B build -G Xcode \ -D CMAKE_SYSTEM_NAME=iOS \ -D CMAKE_OSX_ARCHITECTURES=arm64 \ -D CMAKE_OSX_DEPLOYMENT_TARGET=14.0 \ -D NCINE_IOS_DEVELOPMENT_TEAM=<Apple Developer team ID>
The Xcode generator produces a project that signs the application with the given team (automatic signing) and installs it on a connected device from Xcode itself. Without a team the bundle is left unsigned, which is what the simulator wants. The same configuration works with Ninja (or Makefiles), which is the quickest way to an unsigned bundle for the iOS Simulator of the Mac's own architecture:
cmake -B build -G Ninja \ -D CMAKE_SYSTEM_NAME=iOS \ -D CMAKE_OSX_SYSROOT=iphonesimulator \ -D CMAKE_OSX_ARCHITECTURES=$(uname -m) \ -D CMAKE_OSX_DEPLOYMENT_TARGET=14.0 \ -D CMAKE_BUILD_TYPE=Release cmake --build build
A device bundle built this way has to be signed before a device accepts it: NCINE_IOS_CODESIGN_IDENTITY and NCINE_IOS_PROVISIONING_PROFILE run codesign after the build (or use the Xcode generator). See Platform-specific parameters for iOS for the parameters behind both.
The result is the flat jazz2.app bundle (assembled at build time, there is no install or CPack step): the executable, the Info.plist, the icons scaled from Sources/Icons/1024px.png and the Content directory copied from NCINE_CONTENT_DIR. The original game files go to the application's Documents/Source directory, which the bundle exposes through file sharing (the Files app, or Finder); the converted cache lives in Library/Caches, where the system may reclaim it (it is then rebuilt on the next start), and the trace log Jazz2.log is written next to Source. A simulator build is installed and started with:
xcrun simctl boot <device UDID from `xcrun simctl list devices`> xcrun simctl install booted build/jazz2.app xcrun simctl launch --console booted jazz2.resurrection
Metal is the default rendering backend (the same backend and offline MSL as on macOS, see NCINE_PREFERRED_RHI), with the OpenGL|ES 3.0 profile of the OpenGL backend as the alternative — Apple deprecated it in iOS 12 but still ships it, and it is the one the iOS Simulator can run on a Mac without a Metal-capable GPU. SDL2 is the only window backend: it provides the UIKit window, the touch, game-controller and keyboard input, the on-screen keyboard and the application lifecycle (the game suspends whenever it leaves the foreground, as on Android). LAN server discovery uses multicast, which iOS 14 and newer only allow with the com.apple.developer.networking.multicast entitlement granted by Apple; without it, servers are joined by address.
Building for consoles
Ten consoles are supported, each cross-compiled with its own SDK and its own CMake toolchain file. The build is configured the same way as above, but every one of them also needs its toolchain installed, its own packaging step and, on most of them, a game content tree prepared in advance with AssetPacker. All of that is documented in depth on a page of its own:
| Console | Toolchain | Details |
|---|---|---|
| Nintendo 64 | libdragon | Nintendo 64 |
| Sega Dreamcast | KallistiOS | Sega Dreamcast |
| Nintendo Wii | devkitPPC + libogc | Nintendo Wii |
| Nintendo GameCube | devkitPPC + libogc | Nintendo GameCube |
| Nintendo 3DS | devkitARM + libctru + citro3d | Nintendo 3DS |
| Nintendo Switch | devkitA64 | Nintendo Switch |
| PlayStation Portable | pspdev | PlayStation Portable |
| PlayStation 2 | ps2dev | PlayStation 2 |
| PlayStation 3 | ps3toolchain + PSL1GHT | PlayStation 3 |
| PlayStation Vita | VitaSDK | PlayStation Vita |
See Building for consoles for the toolchain installation, deployment to the device or an emulator, how to read the game's log on each of them, and what each console does and does not support. The game can also be built as a libretro core for RetroArch, see Libretro core.
Building for Amiga systems
The game also runs natively on three Amiga systems, all of them rendering with the same CPU software rasterizer the desktop build can use, because none of them has graphics hardware it could use instead:
| System | Toolchain | CMake toolchain file |
|---|---|---|
| AmigaOS 3.x (m68k, from an accelerated 68060 with RTG upwards - PiStorm/Emu68 and Apollo Vampire being the ones worth playing on) | AmigaPorts' m68k-amigaos-gcc (prebuilt release) | cmake/toolchains/amiga.cmake |
| AmigaOS 4.1 (PowerPC) | adtools (container) | cmake/toolchains/os4.cmake |
| MorphOS (PowerPC) | MorphOS SDK (container) | cmake/toolchains/morphos.cmake |
The classic toolchain needs a specific branch and a few one-time additions to its prefix, the two PowerPC ones come as container images, and the m68k port picks a performance preset by measuring the machine at startup. All of it is documented on Building for Amiga systems.
Building for PortMaster handhelds
Linux handhelds with a custom firmware supported by PortMaster (e.g. Anbernic RG34XX/RG35XX family, R36S, TrimUI Smart Pro) run the regular Linux build with the SDL2 backend and the OpenGL|ES 3.0 profile. What makes it a separate build is the environment: these firmwares ship old system libraries, so it has to be built against an old glibc (Ubuntu 20.04, glibc 2.31), with libopenmpt compiled in, libstdc++ linked statically and OpenSSL bundled next to the executable, while SDL2 and OpenGL|ES are always taken from the firmware. The .github/workflows/portmaster.yml workflow builds both aarch64 and x86_64 and assembles the port in the layout of the PortMaster-New repository, using the launcher script and metadata from "Sources/PortMaster". The original game files are expected in "ports/jazz2/Source".
Running the dedicated server as a container
The dedicated server is published as a multi-architecture (amd64 and arm64) container image, so a server operator doesn't have to build anything:
docker pull ghcr.io/deathkiller/jazz2-server:latest
| Tag | Contents |
|---|---|
latest | Latest release |
3.8 | Latest patch release of a given minor version |
3.8.0 | A particular release |
edge | Current state of the master branch |
Running it takes no more than pointing the server at the game files and its configuration:
docker run -d -i --name jazz2-server --restart unless-stopped \ -p 7438:7438/udp -p 7438:7438/tcp \ -v "$PWD/Source:/app/Source:ro" \ -v "$PWD/Config:/app/Config" \ -v jazz2-cache:/app/Cache \ ghcr.io/deathkiller/jazz2-server:latest
The original Jazz Jackrabbit 2 files are never part of the image, they have to be provided as a volume, just like for a local installation — "./Source/" above. The server reads its configuration from the first command-line argument (defaults to "/app/Config/Jazz2.Server.config" in the image), converts the game files into "/app/Cache" on the first start, and takes console commands from standard input, so "docker attach" opens the server console. The "./Config/" directory has to be writable by uid 1000, the unprivileged user the server runs as. Both SIGINT and SIGTERM shut the server down cleanly, so "docker stop" disconnects the peers and delists the server from the online server list before the process exits. See Multiplayer for how to configure and administer the server, and ServerConfiguration for all configuration properties.
The image is described by the Dockerfile in the repository root, which builds the server with DEDICATED_SERVER — no window or audio backend is compiled, so no graphics or audio libraries are needed and the image contains only libcurl, OpenSSL and zlib besides the game. To build it from sources instead of pulling it:
docker build -t jazz2-server .
The docker-compose.yml next to the Dockerfile describes the whole setup declaratively and covers both cases: "docker compose up -d" runs the published image, "--build" builds it from the sources in the repository. It also parameterizes the instance name, the port and the two host directories, so several servers can run on a single host — each as its own Compose project with its own configuration directory, as described at the top of the file. Two properties deserve attention in that case:
ServerPortandWsPorthave to match the published port. The port is not only announced to the server list, it is also the last part of the identifier the server is listed under (the rest comes from the preferences file, so two instances that share a configuration directory are told apart by their ports alone).ServerAddressOverridehas to be set for a public server. The container sees only its own address on the Docker network, which is of no use to a player on the internet.
Build configuration parameters
By default it tries to find the first available backend for the currently installed libraries. GLFW is usually preferred over SDL2, because it's more lightweight. On the other hand, SDL2 usually has better gamepad support and better support in general. The following parameters can be used to customize the build:
CMAKE_BUILD_TYPE— Build configuration- Possible values:
Debug,Release
- Possible values:
CMAKE_INSTALL_PREFIX(default"/usr/local") — Install prefix on Unix systemsNCINE_CONTENT_DIR(default"./Content") — Path to the"Content"game data directory- Some build targets include
"Content"directory directly inside the executable package (e.g., Android)
- Some build targets include
NCINE_CREATE_CONTENT_SYMLINK(defaultOFF) — Create symbolic link to the"Content"game data directory in target directory- Ignored on Android, Emscripten, Nintendo Switch and UWP platforms
NCINE_DOWNLOAD_DEPENDENCIES(defaultON) — Download all missing dependencies automaticallyNCINE_BUILD_ASSET_PACKER(defaultON) — Build the offline AssetPacker tool- It runs on the build machine, so it's skipped for every cross-compiled target
- Defaults to
OFFifDEDICATED_SERVER,NCINE_BUILD_FLATPAKorNCINE_BUILD_LIBRETROis enabled — the tool is not part of any of those artifacts
NCINE_BUILD_SHADER_COMPILER(defaultON) — Build the offline ShaderCompiler tool- It runs on the build machine, so it's skipped for every cross-compiled target
- Defaults to
OFFin the same configurations asNCINE_BUILD_ASSET_PACKER - The generated shader headers are committed to the repository, so turning it off never affects the game
NCINE_BUILD_LIBRETRO(defaultOFF) — Build as a libretro core instead of an executable, see Libretro core- Only
SoftwareandOpenGLare valid values ofNCINE_PREFERRED_RHIin this configuration
- Only
NCINE_PREFERRED_BACKEND(default"GLFW","SDL2"on PS Vita, Nintendo Switch and iOS, where it is also the only choice) — Preferred core backend- Possible values:
GLFW,SDL2,SDL3 - Ignored on Android, UWP and the consoles with a bespoke window backend
- Possible values:
NCINE_PREFERRED_RHI(default"OpenGL","GXM"on PS Vita,"Metal"on iOS) — Preferred rendering backend (RHI)- Possible values:
OpenGL— Uses the OpenGL family (which profile is chosen withNCINE_RHI_GL_PROFILE)D3D11— Uses Direct3D 11 (Windows with the MSVC toolchain only)Vulkan— Uses Vulkan, on a device withVK_KHR_maintenance1or Vulkan 1.1 (for the negative-height viewport every pass is drawn through; every current desktop driver and MoltenVK have one) — on macOS through MoltenVK: the backend enables the portability extensions the loader needs, but the Vulkan SDK's loader and MoltenVK have to be installed or shipped next to the executableMetal— Uses Metal (macOS and iOS; the offline MSL sources are compiled on the device at load time, no Xcode is needed to build for macOS)GXM— Uses sceGxm directly (PlayStation Vita only), see PlayStation VitaRSX— Uses libgcm directly (PlayStation 3 only), see PlayStation 3PVR— Fixed-function PowerVR backend on top of KallistiOS (Sega Dreamcast only), see Sega DreamcastGX— Fixed-function GX backend for Flipper/Hollywood (Nintendo Wii and Nintendo GameCube only), see Nintendo Wii and Nintendo GameCubeGU— Fixed-function GU backend driving the Allegrex GE throughsceGu(PlayStation Portable only), see PlayStation PortableGS— Fixed-function Graphics Synthesizer backend writing GIF packets directly (PlayStation 2 only), see PlayStation 2RDP— Fixed-function Reality Display Processor backend driving libdragon's rdpq queue (Nintendo 64 only), see Nintendo 64LegacyGL— Fixed-function OpenGL 1.x backend, whose targets are MorphOS' TinyGL and AmigaOS 4.1's MiniGL, see Hardware rendering through TinyGL and Hardware rendering through MiniGL (selectable on the desktop too, where it is how that path is developed and looked at)Software— Uses custom software renderer (no hardware acceleration, lower visual quality and performance)
- Only
GXM,OpenGL(through vitaGL, which pins the profile toES2) andSoftwareare available on PS Vita - Only
LegacyGL(the default) andSoftwareare available on MorphOS and AmigaOS 4.1; AmigaOS 3.x is pinned toSoftware, see Building the project for Amiga systems - Pinned to the console's only rendering backend on Nintendo 64 (
RDP), Sega Dreamcast (PVR), Nintendo Wii and Nintendo GameCube (GX), PlayStation Portable (GU), PlayStation 2 (GS) and PlayStation 3 (RSX), see Building the project for consoles RSXis the only one of those pins that is a shader backend — the RSX is a programmable part, so the PlayStation 3 keeps the post-processing chain the fixed-function consoles lose
- Possible values:
NCINE_RHI_GL_PROFILE— Which profile of the OpenGL family theOpenGLbackend targets- Possible values:
Core— OpenGL 3.3 core profile (GLSL 330, uniform buffer objects,gl_VertexID)ES3— OpenGL|ES 3.0, and WebGL 2.0 on Emscripten (ESSL 300 es)ES2— OpenGL|ES 2.0 (ESSL 100, no uniform buffer objects, nogl_VertexID, no buffer mapping)
- Defaults to
ES3on Android, Emscripten, Nintendo Switch, iOS, ARM Linux and ANGLE builds, and toCoreelsewhere; pinned toES2on PS Vita (vitaGL is an OpenGL|ES 2.0 implementation) and toES3for the libretro core (also the only profile on iOS, whose OpenGL|ES has no EGL for theES2vertex-array-object entry points) - Every profile builds on every platform that can provide the matching client library, so an
ES2build on Android or on the desktop is a normal configuration — it is how the low-end paths are tested without the target hardware
- Possible values:
NCINE_RHI_USE_FB16(defaultOFF) — Use 16-bit (RGB565) color surfaces instead of RGBA8- Trades color depth (and destination alpha, which reads as opaque) for memory and bandwidth. Being a performance option, each backend applies it as deep as it pays off there: the
OpenGLbackend uses it for every color surface it can — a 5/6/5 default framebuffer and RGB565 scene, blur and rescale render targets — while theSoftwarebackend uses it for the screen buffer only, since its rasterizer works on RGBA8 internally either way and packed render targets would only add a conversion per span - Only offered for the
SoftwareandOpenGLbackends — the consoles present through a format their hardware fixes, and 5/6/5 swap chains are not reliably available on D3D11/Vulkan
- Trades color depth (and destination alpha, which reads as opaque) for memory and bandwidth. Being a performance option, each backend applies it as deep as it pays off there: the
NCINE_VERSION_FROM_GIT(defaultON) — Set current game version from Git repository automaticallyNCINE_N64_SIZE_OPTIMIZATION(defaultON, offered on Nintendo 64 only) — Compile the parts of the port that are not in the frame loop for size (-Os) instead of speed- The console's 8 MB of RDRAM is shared by the code, the framebuffers and the whole heap, so the binary's size is the game's memory: the cold sources — level loading, the content conversion, the menus — give back RDRAM the levels then have. The frame loop itself keeps
-O2; building everything for size cost about a fifth of the frame rate when it was measured, see Limits and known issues
- The console's 8 MB of RDRAM is shared by the code, the framebuffers and the whole heap, so the binary's size is the game's memory: the cold sources — level loading, the content conversion, the menus — give back RDRAM the levels then have. The frame loop itself keeps
NCINE_WITH_THREADS(defaultONexcept on Emscripten, Nintendo 64, PlayStation 2, PlayStation 3, the classic Amiga and MorphOS) — Allow to use multiple threads for better performance- Multiplayer requires threads, so it's compiled out where they are unavailable
- Each of those targets is off for its own reason, none of them a configuration choice — see Limits and known issues, Limits and known issues, Limits and known issues, Limits and known issues and What differs from a desktop build. The PlayStation Portable is not among them: it runs on pspdev's pthread-embedded, with a smaller stack than elsewhere (see Limits and known issues)
NCINE_WITH_ANGLE(defaultOFFexcept on UWP) — Enable Google ANGLE library supportNCINE_WITH_GLEW(defaultON) — Use GLEW library, only offered forNCINE_RHI_GL_PROFILE=CoreNCINE_WITH_BACKWARD(defaultONexcept on Android, iOS, Emscripten and UWP) — Enable better exception handlingNCINE_WITH_LZ4(defaultONon the Nintendo 64, Sega Dreamcast, PlayStation 2 and Nintendo GameCube,OFFelsewhere) — Enable LZ4 support, built from source with the target's own toolchain (NCINE_DOWNLOAD_DEPENDENCIES, seecmake/FindLz4.cmake). These consoles cannot convert the game data on the device, so they only ever get a tree prepared by the asset packer, and that tree carries their sprite sheets and tilesets in LZ4 — see LZ4 sprite sheets and tilesets. A build without it refuses such a file instead of misreading itNCINE_WITH_WEBPdeprecated — Enable.webpimage file support, requires libwebp libraryNCINE_WITH_AUDIO(defaultON) — Enable audio support, requires OpenAL library on desktop; the consoles use their own backends, see Audio backendsNCINE_WITH_VORBIS(defaultON) — Enable.oggaudio file support, requires libvorbis libraryNCINE_WITH_OPENMPT(defaultON, forcedOFFon Nintendo 64, PlayStation Portable, PlayStation 2, the classic Amiga, and whereverNCINE_WITH_XMPis on — which by default also covers the Dreamcast, the Wii, the GameCube, the 3DS and the PS Vita) — Enable module music audio file support, requires libopenmpt libraryNCINE_COMPILE_OPENMPT(defaultOFF, forcedONon PlayStation Portable and PlayStation 3) — Download and compile libopenmpt library from source automatically. Neither SDK packages the library, and the runtime fallback the desktop platforms use needs a dynamic loader no console has- See Limits and known issues, Limits and known issues and Limits and known issues for why it's disabled on those — the reasons are unrelated to each other. The PlayStation 3 builds it from source in the library's single-threaded mode (see PlayStation 3)
NCINE_WITH_XMP(defaultONon the Dreamcast, Nintendo Wii, Nintendo GameCube, Nintendo 3DS, PlayStation Portable, PlayStation 2, PS Vita and the classic Amiga,OFFelsewhere) — Play module music with libxmp instead of libopenmpt. Available on every platform: it is how a machine that cannot afford libopenmpt gets music at all, and a legitimate choice anywhere else that would rather spend the CPU elsewhere- The two are alternatives — turning this on turns
NCINE_WITH_OPENMPToff - The library is downloaded and built from source by the configure step (
cmake/Findlibxmp.cmake, pinned by hash), so nothing has to be installed - It is far lighter — an integer mixer rather than a floating-point one — but it does not read MO3, so four of the game's tracks are silent under it, and its playback is less exact than libopenmpt's on the edge cases
- The two are alternatives — turning this on turns
NCINE_WITH_ANGELSCRIPT(defaultOFF) — Enable AngelScript scripting supportANGELSCRIPT_VERSION_TAGallows to specify the version to be downloaded ifNCINE_DOWNLOAD_DEPENDENCIESis enabled
NCINE_WITH_LUAdeprecated — Enable Lua scripting supportNCINE_WITH_IMGUI(defaultOFF) — Enable integration with Dear ImGui libraryIMGUI_VERSION_TAGallows to specify the version to be downloaded
Platform-specific parameters for Android
NCINE_BUILD_ANDROID(defaultOFF) — Enable building for Android platformNCINE_ASSEMBLE_APK(defaultON) — Assemble Android APK file, requires with GradleNCINE_NDK_ARCHITECTURES(default"arm64-v8a") — Semicolon-separated list of target CPU architectures- Possible values:
arm64-v8a(for 64-bit ARM),armeabi-v7a(for 32-bit ARM),x86,x86_64
- Possible values:
NCINE_UNIVERSAL_APK(defaultOFF) — Create universal APK containing all specified CPU architecturesNDK_DIR— Android NDK directory, usually detected automatically
Platform-specific parameters for iOS
The platform itself is selected with CMake's own variables — CMAKE_SYSTEM_NAME=iOS, CMAKE_OSX_SYSROOT (iphoneos or iphonesimulator), CMAKE_OSX_ARCHITECTURES and CMAKE_OSX_DEPLOYMENT_TARGET — see Building for iOS. These decide how the bundle is identified and signed:
NCINE_IOS_BUNDLE_IDENTIFIER(default"jazz2.resurrection") — Bundle identifier of the application; a personal team's provisioning may require an identifier of its ownNCINE_IOS_DEVELOPMENT_TEAM— Apple Developer team ID; the Xcode generator signs the application with it (automatic signing), and a Ninja/Makefile device build derives its entitlements from it. Empty by default, which leaves the bundle unsigned (simulator only)NCINE_IOS_CODESIGN_IDENTITY—codesignidentity (e.g."Apple Development") that signs the bundle after a Ninja/Makefile device build; not used by the Xcode generator, which signs on its ownNCINE_IOS_PROVISIONING_PROFILE— Provisioning profile (.mobileprovision) embedded into a Ninja/Makefile device build next to the signature
Platform-specific parameters for Linux
NCINE_ASSEMBLE_DEB(defaultOFF) — Assemble DEB package of the gameNCINE_ASSEMBLE_RPM(defaultOFF) — Assemble RPM package of the gameNCINE_BUILD_FLATPAK(defaultOFF) — Build Flatpak version of the gameNCINE_LINUX_PACKAGE— Override Linux package name, otherwise"Jazz² Resurrection"will be usedNCINE_OVERRIDE_CONTENT_PATH— Override"Content"directory path- If not specified, following path will be used:
CMAKE_INSTALL_PREFIX "/share/" NCINE_LINUX_PACKAGE "/Content/"
- If not specified, following path will be used:
NCINE_PACKAGED_CONTENT_PATH(defaultOFF) — Use alternative path search strategy- If enabled,
"Content"will be always relative to current directory - Has higher priority than
NCINE_OVERRIDE_CONTENT_PATH
- If enabled,
Platform-specific parameters for Windows
DEATH_WITH_VC_LTL(defaultON) — Build with VC-LTL for lighter binaries, requires VC-LTLNCINE_COPY_DEPENDENCIES(defaultON) — Copy all required libraries to build target directory automaticallyNCINE_INSTALL_SYSLIBS(defaultOFF) — Install the required MSVC system libraries with CMake
Platform-specific parameters for Universal Windows Platform
NCINE_UWP_CERTIFICATE_THUMBPRINT— Code-signing certificate thumbprint- Use either
NCINE_UWP_CERTIFICATE_THUMBPRINTorNCINE_UWP_CERTIFICATE_PATH
- Use either
NCINE_UWP_CERTIFICATE_PATH(default"UwpCertificate.pfx") — Code-signing certificate pathNCINE_UWP_CERTIFICATE_PASSWORD(optional) — Code-signing certificate password forNCINE_UWP_CERTIFICATE_PATH
Advanced parameters
DEATH_CPU_USE_RUNTIME_DISPATCH— Build with runtime dispatch for CPU-dependent functionality- Uses code paths optimized for multiple architectures with the best-matching variant selected at runtime based on detected CPU features, see Death::
Cpu namespace - Enabled by default if
DEATH_CPU_USE_IFUNCis supported
- Uses code paths optimized for multiple architectures with the best-matching variant selected at runtime based on detected CPU features, see Death::
DEATH_CPU_USE_IFUNC(defaultONif supported) — Allow using GNU IFUNC for runtime CPU dispatchDEATH_DEBUG— Enable verbose logging and additional assertions for debugging- Enabled by default for
Debugbuild configuration
- Enabled by default for
DEATH_DEBUG_SYMBOLS— Create debug symbols for executable- A separate
.pdbfile will be created on Windows and Linux, on other platforms the symbols will probably be embedded in the executable - Enabled by default on Windows platforms
- Mutually exclusive with
NCINE_STRIP_BINARIES, which is ignored when this option is enabled — stripping the executable again would remove the.gnu_debuglinksection that ties it to the separate file - On Linux, the
.pdbfile has to be deployed next to the executable, because the.gnu_debuglinksection of the executable references it by file name without a path - On Linux, the headers of
libdw(elfutils) have to be found at configuration time, otherwise the crash reports will contain raw addresses instead of function names — it's the only stack details backend of Backward that follows.gnu_debuglink(seeFindBackward.cmake)- The library itself is loaded at runtime with
dlopen()and not linked, so it doesn't need to be installed on the target system — where it's missing, the crash reports degrade to module names and offsets, which can still be resolved afterwards withaddr2lineand the matching.pdbfile
- The library itself is loaded at runtime with
- A separate
DEATH_TRACE(defaultON) — Enable runtime event tracing, see Asserts.h fileDEATH_TRACE_ASYNC(defaultONifNCINE_WITH_THREADS) — Enable asynchronous processing of event tracing for better performance- Always
OFFon the consoles and in the libretro core
- Always
DEATH_TRACE_LOG_PATH— Override path to trace log file if specified- Also forces writing traces to file on some platforms (except on Android/Switch where it's already forced)
DEATH_USE_FAST_MATH(defaultOFF) — Enable relaxed floating-point optimizations when in release- Compiles with
/fp:faston MSVC and-ffast-math(as part of-Ofastinstead of-O3) on GCC and Clang - Not a free speed-up — the compiler may reassociate arithmetic, assume no NaNs or infinities (which folds
isnan()andisinf()to a constant false) and flush denormals to zero, so enable it only for a target where the gain has been measured and the results verified - Ignored on the consoles and the Amiga targets, which always compile at
-O2
- Compiles with
DEATH_USE_RUNTIME_CAST(defaultON) — Enable Death::runtime_cast() and type information optimization - The cast walks class hierarchies annotated by hand instead of asking the compiler, so the game target is compiled without RTTI (
-fno-rtti,/GR-) — tens of kilobytes of type tables that nothing reads, which on a console comes straight out of the memory a level has - Turning it off gives up both: Death::
runtime_cast() falls back to dynamic_cast<T>(), which needs those tables, so they come back with it. It is a way to cross-check the annotations against what the compiler thinks, not a shipping setting
- The cast walks class hierarchies annotated by hand instead of asking the compiler, so the game target is compiled without RTTI (
NCINE_ADDRESS_SANITIZER(defaultOFF) — EnableAddressSanitizermemory error detectorNCINE_ARCH_EXTENSIONS— Target CPU architecture extensions (instruction sets)NCINE_CODE_COVERAGE(defaultOFF) — Enablegcovinstrumentation for testing code coverageNCINE_GCC_HARDENING(defaultOFF) — Enable memory corruption mitigation methods of GCCNCINE_LINKTIME_OPTIMIZATION(defaultON) — Compile with link-time optimizationNCINE_THREAD_SANITIZER(defaultOFF) — EnableThreadSanitizerdetectorNCINE_UNDEFINED_SANITIZER(defaultOFF) — EnableUndefinedBehaviorSanitizerdetector
Debugging parameters
NCINE_AUTOVECTORIZATION_REPORT(defaultOFF) — Enable report generation from compiler auto-vectorizationNCINE_INPUT_DEBUGGING(defaultOFF) — Enable extensive (gamepad) input debugging and loggingNCINE_PROFILING(defaultOFF) — Enable profilingNCINE_STRIP_BINARIES(defaultOFF) — Strip debug symbols from binaries for smaller sizeNCINE_WITH_FIXED_BATCH_SIZE(defaultOFF) — Enable fixed batch size for renderingNCINE_WITH_RENDERDOCdeprecated — Enable integration with RenderDocNCINE_WITH_TRACY(defaultOFF) — Enable integration with Tracy frame profilerTRACY_VERSION_TAGallows to specify the version to be downloaded
Game-specific parameters
DISABLE_RESCALE_SHADERS(defaultOFF) — Disable rescale shaders and use only nearest neighbor- Rescale shaders are not available with software renderer
TILEMAP_USE_SINGLE_DRAW(defaultON) — Aggregate draw calls for each tilemap layerSHAREWARE_DEMO_ONLY(defaultOFF) — Shareware Demo only, usually used on Emscripten platformWITH_MULTIPLAYER(defaultON) — Enable multiplayer supportWITH_ONLINE_MULTIPLAYER(defaultONifWITH_MULTIPLAYER) — Enable also online multiplayer support, otherwise only local splitscreen is enabledWITH_WEBSOCKET(defaultON) — Enable WebSocket transport for online multiplayerWITH_WEBSOCKET_TLS_BACKEND(defaultOpenSSL) — TLS backend for WebSocket transport- Possible values:
OpenSSL,mbedTLS,None
- Possible values:
DEDICATED_SERVER(defaultOFF) — Build the application as dedicated server only,WITH_MULTIPLAYERmust be enabledSHAREWARE_DEMO_ALLOW_MULTIPLAYER(defaultONifSHAREWARE_DEMO_ONLY) — Enable multiplayer support also in Shareware Demo