Build Guide

CMake targets and options for GalaxyEggbertCNA (and the GalaxyEggbertSimple3D reference target).

Two Build Targets

CMake optionDefaultTargetRole
GALAXY_EGGBERT_BUILD_SIMPLE3DONGalaxyEggbertSimple3DCurrent only fully-playable target, built on Simple3D/U3D
GALAXY_EGGBERT_BUILD_CNAOFF (opt-in)GalaxyEggbertCNALong-term target, built directly on CNA + Easy3D

Building GalaxyEggbertCNA

cmake -S . -B build-cna \
  -DGALAXY_EGGBERT_BUILD_CNA=ON \
  -DGALAXY_EGGBERT_BUILD_SIMPLE3D=OFF
cmake --build build-cna --target GalaxyEggbertCNA -j2

Build directory convention: build-cna. Configure order matters — CNA must be configured before easy-3d (Easy3D auto-detects a parent CNA target).

Sibling Repository Path Overrides

VariableDefault
CNA_HOME${CMAKE_CURRENT_SOURCE_DIR}/../cna
EASY3D_HOME${CMAKE_CURRENT_SOURCE_DIR}/../easy-3d
MOBILE_EGGBERT_HOME${CMAKE_CURRENT_SOURCE_DIR}/../mobile-eggbert

What Links Into GalaxyEggbertCNA

Circular link group On non-Windows GNU/Clang toolchains, CNA and its backend library have circular symbol references, so they are linked inside a -Wl,--start-group … --end-group block.

Post-Build Asset Copy

Custom post-build commands copy mobile-eggbert/Content and mobile-eggbert/worlds (read-only source, not committed here) plus this repo's own committed worlds3d/ directory next to the GalaxyEggbertCNA binary. Skipped when EMSCRIPTEN or ANDROID is set.

Additional Tool Targets

TargetPurpose
GenerateSampleWorld3DGenerates worlds3d/world001.vwr — engine-agnostic, no CNA link needed
VerifyBlupiMovementExercises GEBlupiController headlessly (links only GEBlupiController.cpp — no CNA dependency)

Building GalaxyEggbertSimple3D (reference target)

cmake -S . -B cmake-build-debug -DGALAXY_EGGBERT_BUILD_SIMPLE3D=ON
cmake --build cmake-build-debug --target GalaxyEggbertSimple3D

This is the default (option is ON unless disabled). It remains the only end-to-end-playable target and is not expected to gain new engine-layer investment beyond bug fixes and faithful-remake gameplay parity work.

Running Tests

cmake -S . -B build-cna -DBUILD_TESTING=ON
cmake --build build-cna --target GalaxyEggbertWorldsTests
ctest --test-dir build-cna --output-on-failure

GalaxyEggbertWorldsTests covers only the engine-agnostic Worlds/ data model (World, Chunk, Block, bit-packing, binary I/O) — no dependency on CNA, Easy3D, or Simple3D.

Windows

Cross-compile from Linux using the MinGW-w64 toolchain file, or build natively on Windows. Build-dir convention: build-windows.

cmake -S . -B build-windows \
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/mingw-w64.cmake
cmake --build build-windows -j2