Build Guide
CMake targets and options for GalaxyEggbertCNA (and the GalaxyEggbertSimple3D reference target).
Two Build Targets
| CMake option | Default | Target | Role |
|---|---|---|---|
GALAXY_EGGBERT_BUILD_SIMPLE3D | ON | GalaxyEggbertSimple3D | Current only fully-playable target, built on Simple3D/U3D |
GALAXY_EGGBERT_BUILD_CNA | OFF (opt-in) | GalaxyEggbertCNA | Long-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
| Variable | Default |
|---|---|
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
CNA— the game frameworkSHARP_RUNTIMEeasy3d::easy3d(or theeasy3dtarget)- The CNA graphics backend static library —
cna_backend_graphics_easyglon Linux by default, or an SDL-renderer/BGFX/Vulkan backend elsewhere ${GE_SHARED_SOURCES}— the engine-agnosticsrc/GalaxyEggbert/Worlds/*.cppsources, shared withGalaxyEggbertSimple3D
-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
| Target | Purpose |
|---|---|
GenerateSampleWorld3D | Generates worlds3d/world001.vwr — engine-agnostic, no CNA link needed |
VerifyBlupiMovement | Exercises 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