Skip to content

Commit

Permalink
Add option to use static runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
computerquip-streamlabs committed Aug 10, 2018
1 parent c095627 commit 3ed2804
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,12 @@ list(APPEND obs-browser_LIBRARIES
${CEF_LIBRARIES})

if(MSVC)
string(REPLACE "/MD" "/MT"
"CMAKE_C_FLAGS"
"${CMAKE_C_FLAGS}")

string(REPLACE "/MD" "/MT"
"CMAKE_CXX_FLAGS"
"${CMAKE_CXX_FLAGS}")

string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" UPPER_CONFIG_TYPES)
foreach(CONFIG_TYPE ${UPPER_CONFIG_TYPES})
string(REPLACE "/MD" "/MT"
"CMAKE_C_FLAGS_${CONFIG_TYPE}"
"${CMAKE_C_FLAGS_${CONFIG_TYPE}}")

string(REPLACE "/MD" "/MT"
"CMAKE_CXX_FLAGS_${CONFIG_TYPE}"
"${CMAKE_CXX_FLAGS_${CONFIG_TYPE}}")
endforeach()
option(BROWSER_USE_STATIC_CRT "Use static CRT" ON)

if(BROWSER_USE_STATIC_CRT)
add_compile_options($<IF:$<CONFIG:Debug>,/MTd,/MT>)
endif()

list(APPEND obs-browser_LIBRARIES
d3d11
dxgi
Expand Down

0 comments on commit 3ed2804

Please sign in to comment.