Some work about adaptive color scheme for Web UI (PR #19901)
http://[316:c51a:62a3:8b9::4]/d4708/qBittorrent/src/branch/adaptive-webui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
9 years ago
|
macro(configure_msvc_runtime)
|
||
|
if(MSVC)
|
||
|
# Default to statically-linked runtime.
|
||
|
if("${MSVC_RUNTIME}" STREQUAL "")
|
||
|
set(MSVC_RUNTIME "static")
|
||
|
endif()
|
||
|
# Set compiler options.
|
||
|
set(variables
|
||
|
CMAKE_C_FLAGS_DEBUG
|
||
|
CMAKE_C_FLAGS_MINSIZEREL
|
||
|
CMAKE_C_FLAGS_RELEASE
|
||
|
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||
|
CMAKE_CXX_FLAGS_DEBUG
|
||
|
CMAKE_CXX_FLAGS_MINSIZEREL
|
||
|
CMAKE_CXX_FLAGS_RELEASE
|
||
|
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||
|
)
|
||
|
if(${MSVC_RUNTIME} STREQUAL "static")
|
||
|
message(STATUS
|
||
|
"MSVC -> forcing use of statically-linked runtime."
|
||
|
)
|
||
|
foreach(variable ${variables})
|
||
|
if(${variable} MATCHES "/MD")
|
||
|
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
|
||
|
endif()
|
||
|
endforeach()
|
||
|
else()
|
||
|
message(STATUS
|
||
|
"MSVC -> forcing use of dynamically-linked runtime."
|
||
|
)
|
||
|
foreach(variable ${variables})
|
||
|
if(${variable} MATCHES "/MT")
|
||
|
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
|
||
|
endif()
|
||
|
endforeach()
|
||
|
endif()
|
||
|
endif()
|
||
|
endmacro()
|