Skip to content

Commit f0f5d1b

Browse files
CMake: clear Windows SDK cached variables
1 parent 635d3a3 commit f0f5d1b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ if(WIN32)
115115
endif()
116116

117117
# Get Windows SDK bin directory
118+
unset(WINDOWS_SDK_BIN_DIR CACHE)
118119
if ("${WINDOWS_SDK_VERSION}" VERSION_GREATER_EQUAL "10.0")
119120
get_filename_component(
120121
WINDOWS_KITS_ROOT

Graphics/GraphicsEngineD3DBase/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ endif()
7373

7474
# Set paths to D3Dcompiler_47.dll, dxcompiler.dll, and dxil.dll
7575
if(MSVC)
76+
unset(D3D_COMPILER_PATH CACHE)
77+
unset(DXC_COMPILER_PATH CACHE)
78+
unset(DXIL_SIGNER_PATH CACHE)
79+
7680
if("${WINDOWS_SDK_VERSION}" VERSION_GREATER_EQUAL "10.0" AND WINDOWS_SDK_BIN_DIR)
7781
set(D3D_COMPILER_PATH "${WINDOWS_SDK_BIN_DIR}/D3Dcompiler_47.dll")
7882

@@ -97,7 +101,6 @@ if(MSVC)
97101
set(D3D_COMPILER_PATH "${D3D_COMPILER_PATH}" CACHE INTERNAL "D3Dcompiler_47.dll path")
98102
else()
99103
message(WARNING "Cannot find D3Dcompiler_47.dll. File does not exist: ${D3D_COMPILER_PATH}")
100-
unset(D3D_COMPILER_PATH CACHE)
101104
endif()
102105
endif()
103106

@@ -107,7 +110,6 @@ if(MSVC)
107110
set(DXC_COMPILER_PATH "${DXC_COMPILER_PATH}" CACHE INTERNAL "dxcompiler.dll path")
108111
else()
109112
message(WARNING "Cannot find dxcompiler.dll. File does not exist: ${DXC_COMPILER_PATH}")
110-
unset(DXC_COMPILER_PATH CACHE)
111113
endif()
112114
endif()
113115

@@ -117,7 +119,6 @@ if(MSVC)
117119
set(DXIL_SIGNER_PATH "${DXIL_SIGNER_PATH}" CACHE INTERNAL "dxil.dll path")
118120
else()
119121
message(WARNING "Cannot find dxil.dll. File does not exist: ${DXIL_SIGNER_PATH}")
120-
unset(DXIL_SIGNER_PATH CACHE)
121122
endif()
122123
endif()
123124
endif()

0 commit comments

Comments
 (0)