warfactoryracine/src/modules/world-generation/CMakeLists.txt
StillHammer fd1ec4f503 Implement complete world generation system with geological simulation and resource distribution
## World Generation Pipeline
- Add comprehensive 7-phase geological simulation (4.6 billion years)
- Implement WindRegions-based climate system with ITCZ zones
- Create 18 biome types with scientific classification parameters
- Establish Phase 7 budget assignment and natural feature placement

## Resource System Architecture
- Add 70+ natural features across 8 categories (geological, water, forest, volcanic, etc.)
- Implement complete resource-to-feature mapping for all game materials
- Create individual resource files for metals (iron, copper, gold, uranium, etc.)
- Add comprehensive cross-referencing between features and game resources

## Biome Integration System
- Design scalable blacklist + frequent biomes compatibility system
- Implement mass-based feature selection with geological strength requirements
- Add 5 spatial distribution patterns (concentrated, uniform, ring, clustered, gradient)
- Create region-based feature placement with biome-aware filtering

## Documentation and Architecture
- Add detailed geological and climate simulation system documentation
- Update project overview with world generation achievements
- Establish JSON-driven configuration system for all generation parameters
- Create comprehensive system for Phase 8 integration readiness

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 17:19:01 +08:00

71 lines
2.3 KiB
CMake

cmake_minimum_required(VERSION 3.20)
project(world-generation VERSION 1.0.0)
# C++ Standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Defensive programming by default
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type" FORCE)
# AddressSanitizer and UndefinedBehaviorSanitizer by default
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -g")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address -fsanitize=undefined")
# FetchContent for dependencies
include(FetchContent)
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.2
)
FetchContent_MakeAvailable(nlohmann_json)
# Include directories
target_include_directories(world-generation PRIVATE include)
target_include_directories(world-generation PRIVATE ../../core/include)
# Source files
set(SOURCES
src/WorldGenerationModule.cpp
src/main.cpp
)
# Headers
set(HEADERS
include/WorldGeneration.h
include/GMap.h
)
# Create shared library (.so) for hot-reload
add_library(world-generation SHARED ${SOURCES} ${HEADERS})
# Link libraries
target_link_libraries(world-generation PRIVATE nlohmann_json::nlohmann_json)
# Create standalone executable for testing
add_executable(world-generation-test ${SOURCES})
target_link_libraries(world-generation-test PRIVATE nlohmann_json::nlohmann_json)
# Include directories for test executable
target_include_directories(world-generation-test PRIVATE include)
target_include_directories(world-generation-test PRIVATE ../../core/include)
# Compile definitions for testing
target_compile_definitions(world-generation-test PRIVATE TESTING)
# Build directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# Install targets
install(TARGETS world-generation DESTINATION lib)
install(FILES ${HEADERS} DESTINATION include/world-generation)
# Apply defensive programming (if available)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/WarfactoryDefenses.cmake")
include(../../../cmake/WarfactoryDefenses.cmake)
apply_warfactory_defenses(world-generation)
apply_warfactory_defenses(world-generation-test)
endif()