- Updated `.clangd` configuration to include additional include paths and feature flags tailored for ROM hacking workflows, optimizing IntelliSense support. - Introduced `.pre-commit-config.yaml` for managing code quality checks and formatting, ensuring consistent code style across the project. - Added `cmake-format.yaml` for CMake formatting configuration, promoting adherence to style guidelines. - Enhanced CI workflows to include new actions for testing and building, improving overall reliability and efficiency in the development process. Benefits: - Streamlines development setup and improves code quality through automated checks. - Facilitates better collaboration by ensuring consistent coding standards and configurations.
40 lines
1.1 KiB
CMake
40 lines
1.1 KiB
CMake
# Dear ImGui dependency management
|
|
# Uses CPM.cmake for consistent cross-platform builds
|
|
|
|
include(cmake/CPM.cmake)
|
|
include(cmake/dependencies.lock)
|
|
|
|
message(STATUS "Setting up Dear ImGui ${IMGUI_VERSION} with CPM.cmake")
|
|
|
|
# Use CPM to fetch Dear ImGui
|
|
CPMAddPackage(
|
|
NAME imgui
|
|
VERSION ${IMGUI_VERSION}
|
|
GITHUB_REPOSITORY ocornut/imgui
|
|
GIT_TAG v${IMGUI_VERSION}
|
|
OPTIONS
|
|
"IMGUI_BUILD_EXAMPLES OFF"
|
|
"IMGUI_BUILD_DEMO OFF"
|
|
)
|
|
|
|
# ImGui doesn't create targets during CPM fetch, they're created during build
|
|
# We'll create our own interface target and link to ImGui when it's available
|
|
add_library(yaze_imgui INTERFACE)
|
|
|
|
# Note: ImGui targets will be available after the build phase
|
|
# For now, we'll create a placeholder that can be linked later
|
|
|
|
# Add platform-specific backends
|
|
if(TARGET imgui_impl_sdl2)
|
|
target_link_libraries(yaze_imgui INTERFACE imgui_impl_sdl2)
|
|
endif()
|
|
|
|
if(TARGET imgui_impl_opengl3)
|
|
target_link_libraries(yaze_imgui INTERFACE imgui_impl_opengl3)
|
|
endif()
|
|
|
|
# Export ImGui targets for use in other CMake files
|
|
set(YAZE_IMGUI_TARGETS yaze_imgui)
|
|
|
|
message(STATUS "Dear ImGui setup complete")
|