Skip to content

Commit ea5913a

Browse files
committed
Fix CMake build in Windows for CMAKE_MODULE_PATH force to use "/"
Signed-off-by: loonghao <[email protected]>
1 parent ab317e6 commit ea5913a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rezplugins/shell/cmd.py

+4
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ def escape_string(self, value, is_path=False):
245245
return result
246246

247247
def normalize_path(self, path):
248+
cmake_module_path = os.getenv("CMAKE_MODULE_PATH")
249+
if cmake_module_path and path in cmake_module_path:
250+
# Fix CMake build in Windows for `CMAKE_MODULE_PATH` force to use "/"
251+
return path.replace("\\", "/")
248252
return to_windows_path(path)
249253

250254
def _saferefenv(self, key):

0 commit comments

Comments
 (0)