CMake: Use CEF_RUNTIME_LIBRARY_FLAG
Instead of manually modifying the build flags. Because libcef_dll_wrapper uses a cached variable, we have to force a cache change.
This commit is contained in:
parent
cd7e6308cd
commit
c39d2243a0
1 changed files with 9 additions and 6 deletions
|
|
@ -56,18 +56,21 @@ endif()
|
|||
set(USE_ATL OFF) # Disable usage of ATL in CEF
|
||||
set(USE_SANDBOX OFF) # Disable usage of sandbox on windows
|
||||
|
||||
if(MSVC)
|
||||
if(wxBUILD_USE_STATIC_RUNTIME)
|
||||
set(CEF_RUNTIME_LIBRARY_FLAG "/MT" CACHE STRING "" FORCE)
|
||||
else()
|
||||
set(CEF_RUNTIME_LIBRARY_FLAG "/MD" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(${CEF_ROOT} ${CEF_BUILD_DIR} EXCLUDE_FROM_ALL)
|
||||
set_target_properties(libcef_dll_wrapper PROPERTIES
|
||||
FOLDER "Third Party Libraries"
|
||||
OUTPUT_NAME "libcef_dll_wrapper"
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
# Modify CEF compiler options to match VC runtime
|
||||
get_target_property(cef_compile_options libcef_dll_wrapper COMPILE_OPTIONS)
|
||||
string(REGEX REPLACE "/MTd?;" "" cef_compile_options "${cef_compile_options}")
|
||||
set_target_properties(libcef_dll_wrapper PROPERTIES COMPILE_OPTIONS "${cef_compile_options}")
|
||||
else()
|
||||
if(NOT MSVC)
|
||||
set_target_properties(libcef_dll_wrapper PROPERTIES COMPILE_OPTIONS "-Wno-extra")
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue