Skip to content

Commit d18b531

Browse files
committed
Foundation: build CoreFoundation as /MD
Use /MD and /MDd mode compilation rather than /MT or /MTd as per Microsoft's recommendation. This allows us to use a shared C runtime. The static MSVCRT/ucrt cannot be intermingled with a dynamic one.
1 parent df3196b commit d18b531

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ ExternalProject_Add(CoreFoundation
3737
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
3838
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
3939
# NOTE(compnerd) ensure that we build it as a DLL as we
40-
# wish to re-export the symbols from Foundation
41-
-DCMAKE_C_FLAGS=-D_USRDLL
40+
# wish to re-export the symbols from Foundation.
41+
# Furthermore, build for the shared MSVCRT runtime.
42+
-DCMAKE_C_FLAGS="-D_USRDLL -D_DLL"
4243
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
4344
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
4445
-DCMAKE_INSTALL_LIBDIR=usr/lib

0 commit comments

Comments
 (0)