mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 08:24:16 +09:00
[cmake] set MSVC runtime for SDL client
This commit is contained in:
committed by
Martin Fleisz
parent
c9f55a964d
commit
4f0ca73be6
@@ -249,7 +249,7 @@ endif()
|
||||
if(MSVC)
|
||||
include(MSVCRuntime)
|
||||
if(NOT DEFINED MSVC_RUNTIME)
|
||||
set(MSVC_RUNTIME "dynamic")
|
||||
set(MSVC_RUNTIME "dynamic" CACHE STRING "MSVC runtime type [dynamic|static]")
|
||||
endif()
|
||||
if(MSVC_RUNTIME STREQUAL "static")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
|
||||
@@ -39,6 +39,27 @@ option(WITH_DEBUG_SDL_EVENTS "[dangerous, not for release builds!] Debug SDL eve
|
||||
option(WITH_DEBUG_SDL_KBD_EVENTS "[dangerous, not for release builds!] Debug SDL keyboard events" OFF)
|
||||
option(WITH_WIN_CONSOLE "Build ${PROJECT_NAME} with console support" ON)
|
||||
|
||||
# Configure MSVC Runtime
|
||||
if(MSVC)
|
||||
include(MSVCRuntime)
|
||||
if(NOT DEFINED MSVC_RUNTIME)
|
||||
set(MSVC_RUNTIME "dynamic" CACHE STRING "MSVC runtime type [dynamic|static]")
|
||||
endif()
|
||||
if(MSVC_RUNTIME STREQUAL "static")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
message(FATAL_ERROR "Static CRT is only supported in a fully static build")
|
||||
endif()
|
||||
message(STATUS "Use the MSVC static runtime option carefully!")
|
||||
message(STATUS "OpenSSL uses /MD by default, and is very picky")
|
||||
message(STATUS "Random freeing errors are a common sign of runtime issues")
|
||||
endif()
|
||||
configure_msvc_runtime()
|
||||
|
||||
if(NOT DEFINED CMAKE_SUPPRESS_REGENERATION)
|
||||
set(CMAKE_SUPPRESS_REGENERATION ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_WIN_CONSOLE)
|
||||
set(WIN32_GUI_FLAG "")
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user