Removed core engine infrastructure from warfactoryracine: - Core interfaces: IEngine, IModule, IModuleSystem, IIO, ITaskScheduler, ICoordinationModule - Configuration system: IDataTree, IDataNode, DataTreeFactory - UI system: IUI, IUI_Enums, ImGuiUI (header + implementation) - Resource management: Resource, ResourceRegistry, SerializationRegistry - Serialization: ASerializable, ISerializable - World generation: IWorldGenerationStep (replaced by IWorldGenerationPhase) These components now live in the GroveEngine repository and are included via CMake add_subdirectory(../GroveEngine) for reusability across projects. warfactoryracine remains focused on game-specific logic and content. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
108 lines
2.8 KiB
CMake
108 lines
2.8 KiB
CMake
cmake_minimum_required(VERSION 3.16)
|
|
project(ImGuiUI_Test)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
# 🚫 CRITICAL: Prohibit 'auto' keyword as type (explicit types required)
|
|
# Applied only to project files, not external dependencies
|
|
|
|
# 🔧 DEVELOPMENT MODE - Enable all debugging tools (can be overridden)
|
|
# set(CMAKE_BUILD_TYPE Debug) # Commented out to allow Release builds
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-fsanitize=address -fsanitize=undefined -g -O0 -Wall -Wextra")
|
|
set(CMAKE_C_FLAGS_DEBUG "-fsanitize=address -fsanitize=undefined -g -O0 -Wall -Wextra")
|
|
|
|
# Link AddressSanitizer
|
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-fsanitize=address -fsanitize=undefined")
|
|
|
|
# Find packages
|
|
find_package(glfw3 REQUIRED)
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
# Add FetchContent for dependencies
|
|
include(FetchContent)
|
|
|
|
# nlohmann/json
|
|
FetchContent_Declare(
|
|
nlohmann_json
|
|
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
|
GIT_TAG v3.11.3
|
|
)
|
|
|
|
# Dear ImGui
|
|
FetchContent_Declare(
|
|
imgui
|
|
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
|
GIT_TAG v1.90.1
|
|
)
|
|
|
|
FetchContent_MakeAvailable(nlohmann_json imgui)
|
|
|
|
# Add GroveEngine
|
|
add_subdirectory(../GroveEngine GroveEngine_build)
|
|
|
|
# Create ImGui library with OpenGL/GLFW backends
|
|
add_library(imgui_backends
|
|
${imgui_SOURCE_DIR}/imgui.cpp
|
|
${imgui_SOURCE_DIR}/imgui_demo.cpp
|
|
${imgui_SOURCE_DIR}/imgui_draw.cpp
|
|
${imgui_SOURCE_DIR}/imgui_tables.cpp
|
|
${imgui_SOURCE_DIR}/imgui_widgets.cpp
|
|
${imgui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp
|
|
${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp
|
|
)
|
|
|
|
target_include_directories(imgui_backends PUBLIC
|
|
${imgui_SOURCE_DIR}
|
|
${imgui_SOURCE_DIR}/backends
|
|
)
|
|
|
|
target_link_libraries(imgui_backends PUBLIC glfw OpenGL::GL)
|
|
|
|
# Test executable
|
|
add_executable(test_imgui_ui
|
|
test_imgui_ui.cpp
|
|
)
|
|
|
|
target_include_directories(test_imgui_ui PRIVATE
|
|
${imgui_SOURCE_DIR}
|
|
${imgui_SOURCE_DIR}/backends
|
|
)
|
|
|
|
target_link_libraries(test_imgui_ui
|
|
GroveEngine::impl
|
|
imgui_backends
|
|
nlohmann_json::nlohmann_json
|
|
glfw
|
|
OpenGL::GL
|
|
)
|
|
|
|
# Note: Auto keyword restriction enforced via code review and linting tools
|
|
|
|
# Copy to build directory
|
|
set_target_properties(test_imgui_ui PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
|
)
|
|
|
|
# Test constraints executable
|
|
add_executable(test_constraints
|
|
test_constraints.cpp
|
|
)
|
|
|
|
target_include_directories(test_constraints PRIVATE
|
|
${imgui_SOURCE_DIR}
|
|
${imgui_SOURCE_DIR}/backends
|
|
)
|
|
|
|
target_link_libraries(test_constraints
|
|
GroveEngine::impl
|
|
imgui_backends
|
|
nlohmann_json::nlohmann_json
|
|
glfw
|
|
OpenGL::GL
|
|
)
|
|
|
|
# Note: Auto keyword restriction enforced via code review and linting tools
|
|
|
|
set_target_properties(test_constraints PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
|
) |