So, I reverted the build.gn change and made this change:
- Code: Select all
diff --git a/cmake/cef_variables.cmake.in b/cmake/cef_variables.cmake.in
index 94b4b87..c7c509d 100644
--- a/cmake/cef_variables.cmake.in
+++ b/cmake/cef_variables.cmake.in
@@ -360,17 +360,17 @@ if(OS_WINDOWS)
set(CMAKE_CXX_FLAGS_DEBUG "")
list(APPEND CEF_COMPILER_FLAGS_DEBUG
- /MT # Multithreaded release runtime
+ /MD # Multithreaded release runtime
)
else()
list(APPEND CEF_COMPILER_FLAGS_DEBUG
- /MTd # Multithreaded debug runtime
+ /MDd # Multithreaded debug runtime
/RTC1 # Disable optimizations
/Od # Enable basic run-time checks
)
endif()
list(APPEND CEF_COMPILER_FLAGS_RELEASE
- /MT # Multithreaded release runtime
+ /MD # Multithreaded release runtime
/O2 # Optimize for maximum speed
/Ob2 # Inline any suitable function
/GF # Enable string pooling
CEF then built successfully. I then tried to link the libraries into my project and received linking errors (see attachment 'project build log.txt'). Seeing these errors, I made the following change:
- Code: Select all
diff --git a/BUILD.gn b/BUILD.gn
index ce91fb1..4ade9f9 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -947,6 +947,7 @@ static_library("libcef_dll_wrapper") {
configs += [ ":libcef_dll_wrapper_config" ]
public_configs = [ ":libcef_dll_wrapper_config" ]
+ cflags_cc = [ "/MD" ]
}
Which, netted me errors when building CEF (see attachment 'wrapper only md build log.txt'). These errors seem to be related with building a consumer of the wrapper, so I moved the flag to the wrapper config:
- Code: Select all
diff --git a/BUILD.gn b/BUILD.gn
index ce91fb1..9d990b7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -930,6 +930,7 @@ config("libcef_dll_wrapper_config") {
# They will be copied to the include/ directory in the binary distribution.
"$root_out_dir/includes",
]
+ cflags_cc = [ "/MD" ]
}
# libcef_dll_wrapper target.
Which, should apply to the consumers of the wrapper and the wrapper, but now I am getting new errors when trying to build CEF (see attachment 'wrapper config set to build md log.txt'). Not sure what to do next. Any more ideas?