diff --git a/cmake/cef_variables.cmake.in b/cmake/cef_variables.cmake.in index 0959dc11c..e10e4863c 100644 --- a/cmake/cef_variables.cmake.in +++ b/cmake/cef_variables.cmake.in @@ -350,6 +350,13 @@ if(OS_WINDOWS) # Consumers who run into LNK4099 warnings can pass /Z7 instead (see issue #385). set(CEF_DEBUG_INFO_FLAG "/Zi" CACHE STRING "Optional flag specifying specific /Z flag to use") + # Consumers using different runtime types may want to pass different flags + set(CEF_RUNTIME_LIBRARY_FLAG "/MT" CACHE STRING "Optional flag specifying which runtime to use") + if (CEF_RUNTIME_LIBRARY_FLAG) + list(APPEND CEF_COMPILER_FLAGS_DEBUG ${CEF_RUNTIME_LIBRARY_FLAG}d) + list(APPEND CEF_COMPILER_FLAGS_RELEASE ${CEF_RUNTIME_LIBRARY_FLAG}) + endif() + # Platform-specific compiler/linker flags. set(CEF_LIBTYPE STATIC) list(APPEND CEF_COMPILER_FLAGS @@ -369,12 +376,10 @@ if(OS_WINDOWS) ${CEF_DEBUG_INFO_FLAG} ) list(APPEND CEF_COMPILER_FLAGS_DEBUG - /MTd # Multithreaded debug runtime /RTC1 # Disable optimizations /Od # Enable basic run-time checks ) list(APPEND CEF_COMPILER_FLAGS_RELEASE - /MT # Multithreaded release runtime /O2 # Optimize for maximum speed /Ob2 # Inline any suitable function /GF # Enable string pooling