chore: include shader paths for IDE code completion#1094
Conversation
WalkthroughThe CMake configuration was updated to automatically detect and include all "Shaders" directories within feature subfolders as private include directories. Additionally, the configuration now explicitly includes the "package/Shaders" directory. No changes were made to build logic, linking, or public interfaces. Changes
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
CMakeLists.txt (2)
60-66: Sort and consolidate shader include directories
TheFEATURE_SHADER_DIRSlist may be processed in arbitrary filesystem order, leading to non-deterministic include statements in your IDE project. Sort the list for stable ordering, and you could merge multipletarget_include_directoriescalls into one block to simplify maintenance:+list(SORT FEATURE_SHADER_DIRS) foreach(_dir IN LISTS FEATURE_SHADER_DIRS) target_include_directories( ${PROJECT_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/${_dir}" ) endforeach()
73-74: Guard manual include ofpackage/Shadersagainst missing folders
Ifpackage/Shadersis ever moved or deleted, CMake will error out. Wrap the explicit include in an existence check:- "${CMAKE_SOURCE_DIR}/package/Shaders" +if(EXISTS "${CMAKE_SOURCE_DIR}/package/Shaders") + target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/package/Shaders") +endif()
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
CMakeLists.txt(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build plugin and addons
|
✅ A pre-release build is available for this PR: |
Summary by CodeRabbit