Fix ICD generation on windows.
The ICD_LIBRARY_PATH variable needs to be double-escaped - once for CMake, and another for the actual .json file.
Bug b/116336664
Change-Id: I8fd68c6a030b689e6432828ec5f1cf938c2a0d45
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34455
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87668b7..297e34c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2022,7 +2022,7 @@
set(ICD_LIBRARY_PATH "libvk_swiftshader${CMAKE_SHARED_LIBRARY_SUFFIX}")
if(WIN32)
# The path is output to a JSON file, which requires backslashes to be escaped.
- set(ICD_LIBRARY_PATH ".\\${ICD_LIBRARY_PATH}")
+ set(ICD_LIBRARY_PATH ".\\\\${ICD_LIBRARY_PATH}")
else()
set(ICD_LIBRARY_PATH "./${ICD_LIBRARY_PATH}")
endif()