mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-02 12:17:15 +01:00
Windows: cmake: Add CEF_RUNTIME_LIBRARY_FLAG for overriding VS runtime type.
This commit is contained in:
parent
39ccd85d77
commit
cca0bcc8e0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user