diff --git a/CMakeLists.txt b/CMakeLists.txt index ee44029bdb..d0e5616ebb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,10 @@ set(ZIG_LIBC_INCLUDE_DIR "/usr/include" CACHE STRING "Default native target libc set(ZIG_DYNAMIC_LINKER "" CACHE STRING "Override dynamic linker for native target") set(ZIG_EACH_LIB_RPATH off CACHE BOOL "Add each dynamic library to rpath for native target") +string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_LIB_DIR_ESCAPED ${ZIG_LIBC_LIB_DIR}) +string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_STATIC_LIB_DIR_ESCAPED ${ZIG_LIBC_STATIC_LIB_DIR}) +string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_INCLUDE_DIR_ESCAPED ${ZIG_LIBC_INCLUDE_DIR}) + option(ZIG_TEST_COVERAGE "Build Zig with test coverage instrumentation" OFF) # To see what patches have been applied to LLD in this repository: diff --git a/src/config.h.in b/src/config.h.in index 7fec876dc0..6aa3312d7f 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -15,9 +15,9 @@ #define ZIG_HEADERS_DIR "@CMAKE_INSTALL_PREFIX@/@C_HEADERS_DEST@" #define ZIG_STD_DIR "@CMAKE_INSTALL_PREFIX@/@ZIG_STD_DEST@" -#define ZIG_LIBC_INCLUDE_DIR "@ZIG_LIBC_INCLUDE_DIR@" -#define ZIG_LIBC_LIB_DIR "@ZIG_LIBC_LIB_DIR@" -#define ZIG_LIBC_STATIC_LIB_DIR "@ZIG_LIBC_STATIC_LIB_DIR@" +#define ZIG_LIBC_INCLUDE_DIR "@ZIG_LIBC_INCLUDE_DIR_ESCAPED@" +#define ZIG_LIBC_LIB_DIR "@ZIG_LIBC_LIB_DIR_ESCAPED@" +#define ZIG_LIBC_STATIC_LIB_DIR "@ZIG_LIBC_STATIC_LIB_DIR_ESCAPED@" #define ZIG_DYNAMIC_LINKER "@ZIG_DYNAMIC_LINKER@" #cmakedefine ZIG_EACH_LIB_RPATH