Building

Building Nova-3D

CMake-based build instructions for all supported platforms.

Repository Layout

Nova-3D depends on sibling repositories. Check them all out in the same parent directory:

workspace/
├── nova-3d/        ← this repository
├── cna/            ← CNA: C++ XNA 4.0 reimplementation (internal)
├── sharp-runtime/  ← sharp-runtime: .NET-like support layer (internal)
└── easy-gl/        ← EasyGL: low-level OpenGL wrapper (internal)
Why sibling repos? CNA and sharp-runtime are private dependencies of Nova-3D. CMake finds them relative to the Nova-3D checkout. See the CMakeLists.txt for exact paths.

Linux & macOS

Dependencies

# Ubuntu / Debian
sudo apt install cmake build-essential libsdl3-dev libgl-dev

# Fedora
sudo dnf install cmake gcc-c++ SDL3-devel mesa-libGL-devel

# macOS (Homebrew)
brew install cmake sdl3

Build

cd nova-3d
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build --parallel

# Available targets:
cmake --build build --target Nova3DHelloWorld
cmake --build build --target Nova3DCube3DDemo

Windows

Option A: MinGW-w64 (recommended)

# Install: MSYS2 + mingw-w64-x86_64-cmake + mingw-w64-x86_64-SDL3
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/mingw-w64.cmake
cmake --build build --target Nova3DCube3DDemo

Option B: MSVC 2022

cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Debug --target Nova3DCube3DDemo

See WINDOWS.md in the repository root for additional Windows-specific notes.

Android

Android build infrastructure is located in the android/ directory. Requires:

  • Android Studio or the Android SDK command-line tools
  • NDK r25 or later
  • Gradle 8+
cd android
./gradlew assembleDebug

See ANDROID.md for detailed Android build steps and device setup.

Web (Emscripten)

Web builds via Emscripten are in progress. The CMake infrastructure includes cmake/web/ stubs. Full Emscripten support is planned for a future release.

# When available:
emcmake cmake -S . -B build-web
cmake --build build-web --target Nova3DCube3DDemo

CMake Options

OptionDefaultDescription
CMAKE_BUILD_TYPEDebugBuild type: Debug, Release, RelWithDebInfo
NOVA3D_BUILD_EXAMPLESONBuild example applications
NOVA3D_BUILD_TESTSONBuild the test suite

Running Tests

cmake --build build --target all
cd build && ctest --output-on-failure