Build Guide
CMake targets and renderer options for GalaxyEggbertCNA.
Game Target
| CMake option | Default | Target | Role |
|---|---|---|---|
GALAXY_EGGBERT_BUILD_CNA | ON | GalaxyEggbertCNA | The maintained game, built directly on CNA with cna-engine's strict modules (CnaEngine::Core, CnaEngine::Graphics) beside it — easy-3d until 2026-10-20 |
Desktop OpenGL 3.3
cmake -S . -B build-cna-opengl3 \
-DGALAXY_EGGBERT_BUILD_CNA=ON \
-DCNA_GRAPHICS_RENDERER=OPENGL33
cmake --build build-cna-opengl3 --target GalaxyEggbertCNA -j2
Run the executable from build-cna-opengl3, because runtime asset paths are relative.
WebGL 2
emcmake cmake -S . -B build-cna-webgl2 \
-DGALAXY_EGGBERT_BUILD_CNA=ON \
-DCNA_GRAPHICS_RENDERER=WEBGL2 \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF
cmake --build build-cna-webgl2 --target GalaxyEggbertCNA -j2
Sibling Repository Path Overrides
| Variable | Default |
|---|---|
CNA_HOME | ${CMAKE_CURRENT_SOURCE_DIR}/../cna |
CNA_ENGINE_HOME | ${CMAKE_CURRENT_SOURCE_DIR}/../cna-engine |
CNA_ENGINE_HOME (e.g. -DCNA_ENGINE_HOME=<path>) replaced
EASY3D_HOME when cna-engine replaced easy-3d on 2026-10-20.
What Links Into GalaxyEggbertCNA
CNA— the game frameworkSHARP_RUNTIMECnaEngine::Graphics— cna-engine's strict modules (it pulls inCnaEngine::Core); they link CNA's static module libraries, so CNA is built withCNA_SHARED_LIBRARY=OFF- The renderer target selected by CNA's
CNA_GRAPHICS_RENDERERoption ${GE_SHARED_SOURCES}— the engine-independent world/data sources
Post-Build Asset Copy
Custom post-build commands stage this repository's Content/, worlds3d/,
textures3d/, and avatars3d/ beside the native executable. Emscripten
embeds the required directories into its generated .data bundle.
Additional Tool Targets
| Target | Purpose |
|---|---|
GenerateSampleWorld3D | Generates worlds3d/world001.vwr — engine-agnostic, no CNA link needed |
VerifyBlupiMovement | Exercises the engine-independent Blupi controller headlessly |
Running Tests
cmake --build build-cna-opengl3 -j2
ctest --test-dir build-cna-opengl3 \
-E easy-gl-resource-smoke-tests --output-on-failure
GalaxyEggbertWorldsTests covers only the engine-agnostic Worlds/
data model (World, Chunk, Block, bit-packing, binary I/O)
— no dependency on CNA or cna-engine.
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