This document contains instructions for how to build Godot Jolt from source.
See hacking.md
for details aimed at developers.
- Building for Windows
- Building for Linux
- Building for macOS
- Building for iOS
- Building for Android
- Building for double-precision
Prerequisites:
- Git 2.25 or newer
- CMake 3.22 or newer
- Python 3.8 or newer
- Visual Studio 2022 (with the "Desktop development with C++" workload)
- You can also use the more lightweight "Build Tools for Visual Studio 2022" instead
- (Optional) Visual Studio's clang-cl component
- If you wish to compile with LLVM clang-cl instead of Visual C++
x64
with x86
.
Using Microsoft Visual C++:
# Generate the build directory
cmake --preset windows-msvc-x64
# Build non-editor binaries and install them into the examples project
cmake --build --preset windows-msvc-x64-distribution
# Build editor binaries and install them into the examples project
cmake --build --preset windows-msvc-x64-editor-distribution
# Install non-editor binaries into your project, under `addons/godot-jolt`
cmake --install build/windows-msvc-x64 --config Distribution --prefix C:/Path/To/Project
# Install editor binaries into your project, under `addons/godot-jolt`
cmake --install build/windows-msvc-x64 --config EditorDistribution --prefix C:/Path/To/Project
Using LLVM clang-cl:
# Generate the build directory
cmake --preset windows-clangcl-x64
# Build non-editor binaries and install them into the examples project
cmake --build --preset windows-clangcl-x64-distribution
# Build editor binaries and install them into the examples project
cmake --build --preset windows-clangcl-x64-editor-distribution
# Install non-editor binaries into your project, under `addons/godot-jolt`
cmake --install build/windows-clangcl-x64 --config Distribution --prefix C:/Path/To/Project
# Install editor binaries into your project, under `addons/godot-jolt`
cmake --install build/windows-clangcl-x64 --config EditorDistribution --prefix C:/Path/To/Project
Prerequisites:
- Git 2.25 or newer
- CMake 3.22 or newer
- Python 3.8 or newer
- GCC 13 or newer
- (Optional) Clang 16.0.0 or newer
- If you wish to compile with LLVM/Clang instead of GCC
x64
with x86
.
Using GCC:
# Generate the build directory
cmake --preset linux-gcc-x64
# Build non-editor binaries and install them into the examples project
cmake --build --preset linux-gcc-x64-distribution
# Build editor binaries and install them into the examples project
cmake --build --preset linux-gcc-x64-editor-distribution
# Install non-editor binaries into your project, under `addons/godot-jolt`
cmake --install build/linux-gcc-x64 --config Distribution --prefix /path/to/project
# Install editor binaries into your project, under `addons/godot-jolt`
cmake --install build/linux-gcc-x64 --config EditorDistribution --prefix /path/to/project
Using Clang:
# Generate the build directory
cmake --preset linux-clang-x64
# Build non-editor binaries and install them into the examples project
cmake --build --preset linux-clang-x64-distribution
# Build editor binaries and install them into the examples project
cmake --build --preset linux-clang-x64-editor-distribution
# Install non-editor binaries into your project, under `addons/godot-jolt`
cmake --install build/linux-clang-x64 --config Distribution --prefix /path/to/project
# Install editor binaries into your project, under `addons/godot-jolt`
cmake --install build/linux-clang-x64 --config EditorDistribution --prefix /path/to/project
Prerequisites:
- Git 2.25 or newer
- CMake 3.22 or newer
- Python 3.8 or newer
- Xcode 14.3 or equivalent Xcode Command Line Tools
# Generate the build directory
cmake --preset macos-clang
# Build non-editor binaries and install them into the examples project
cmake --build --preset macos-clang-distribution
# Build editor binaries and install them into the examples project
cmake --build --preset macos-clang-editor-distribution
# Install non-editor binaries into your project, under `addons/godot-jolt`
cmake --install build/macos-clang --config Distribution --prefix /path/to/project
# Install editor binaries into your project, under `addons/godot-jolt`
cmake --install build/macos-clang --config EditorDistribution --prefix /path/to/project
Prerequisites:
- Git 2.25 or newer
- CMake 3.22 or newer
- Python 3.8 or newer
- Xcode 14.3 or equivalent Xcode Command Line Tools
# Generate the build directory
cmake --preset macos-ios
# Build non-editor binaries and install them into the examples project
cmake --build --preset macos-ios-distribution
# Build editor binaries and install them into the examples project
cmake --build --preset macos-ios-editor-distribution
# Install non-editor binaries into your project, under `addons/godot-jolt`
cmake --install build/macos-ios --config Distribution --prefix /path/to/project
# Install editor binaries into your project, under `addons/godot-jolt`
cmake --install build/macos-ios --config EditorDistribution --prefix /path/to/project
Prerequisites:
- Git 2.25 or newer
- CMake 3.22 or newer
- Python 3.8 or newer
- Android NDK 25.2.9519653 or newer
ANDROID_NDK_ROOT
that points
to the Android NDK root directory.
windows-
with either linux-
or macos-
.
# Generate the build directories
cmake --preset windows-android-arm64
cmake --preset windows-android-arm32
cmake --preset windows-android-x64
cmake --preset windows-android-x86
# Build non-editor binaries and install them into the examples project
cmake --build --preset windows-android-arm64-distribution
cmake --build --preset windows-android-arm32-distribution
cmake --build --preset windows-android-x64-distribution
cmake --build --preset windows-android-x86-distribution
# Build editor binaries and install them into the examples project
cmake --build --preset windows-android-arm64-editor-distribution
cmake --build --preset windows-android-arm32-editor-distribution
cmake --build --preset windows-android-x64-editor-distribution
cmake --build --preset windows-android-x86-editor-distribution
# Install non-editor binaries into your project, under `addons/godot-jolt`
cmake --install build/windows-android-arm64 --config Distribution --prefix /path/to/project
cmake --install build/windows-android-arm32 --config Distribution --prefix /path/to/project
cmake --install build/windows-android-x64 --config Distribution --prefix /path/to/project
cmake --install build/windows-android-x86 --config Distribution --prefix /path/to/project
# Install editor binaries into your project, under `addons/godot-jolt`
cmake --install build/windows-android-arm64 --config EditorDistribution --prefix /path/to/project
cmake --install build/windows-android-arm32 --config EditorDistribution --prefix /path/to/project
cmake --install build/windows-android-x64 --config EditorDistribution --prefix /path/to/project
cmake --install build/windows-android-x86 --config EditorDistribution --prefix /path/to/project
Building for double-precision builds of Godot involves the same steps as what's shown above, but
with the only difference that you add the -DGDJ_DOUBLE_PRECISION=TRUE
argument when generating the
build directory.
So instead of doing this:
# Generate the build directory
cmake --preset windows-msvc-x64
You would instead do this:
# Generate the build directory with double-precision enabled
cmake --preset windows-msvc-x64 -DGDJ_DOUBLE_PRECISION=TRUE