summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
authorlujinwangnv <143145775+lujinwangnv@users.noreply.github.com>2025-05-09 18:01:22 -0700
committerGitHub <noreply@github.com>2025-05-10 01:01:22 +0000
commit5a6c2baadbc16fc2099a6951e389b9bd3cad08f6 (patch)
tree1462aa33254eac9dbaee80fa1f6116b29db244e0 /external
parent029672ee08f5ecb710e84cf1ccc625e826ff9a29 (diff)
Update build to allow setting more external paths (#7044)
* Update build to allow setting more external paths Update the build to allow setting user-specific paths for the external modules: glm, imgui, slang-rhi, and tinyobjloader.
Diffstat (limited to 'external')
-rw-r--r--external/CMakeLists.txt29
1 files changed, 23 insertions, 6 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index afab86a9d..55d9e4941 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -157,11 +157,19 @@ endif()
# imgui
add_library(imgui INTERFACE)
-target_include_directories(
- imgui
- ${system}
- INTERFACE "${CMAKE_CURRENT_LIST_DIR}/imgui"
-)
+if(NOT SLANG_OVERRIDE_IMGUI_PATH)
+ target_include_directories(
+ imgui
+ ${system}
+ INTERFACE "${CMAKE_CURRENT_LIST_DIR}/imgui"
+ )
+else()
+ target_include_directories(
+ imgui
+ ${system}
+ INTERFACE "${SLANG_OVERRIDE_IMGUI_PATH}"
+ )
+endif()
# stb
add_library(stb INTERFACE)
@@ -196,7 +204,16 @@ if(SLANG_ENABLE_SLANG_RHI)
set(SLANG_RHI_ENABLE_D3D11 OFF)
set(SLANG_RHI_ENABLE_D3D12 OFF)
endif()
- add_subdirectory(slang-rhi)
+ if(NOT SLANG_OVERRIDE_SLANG_RHI_PATH)
+ add_subdirectory(slang-rhi)
+ else()
+ add_subdirectory(
+ ${SLANG_OVERRIDE_SLANG_RHI_PATH}
+ slang-rhi
+ EXCLUDE_FROM_ALL
+ ${system}
+ )
+ endif()
endif()
# Tidy things up: