[cmake] use CMAKE_MSVC_RUNTIME_LIBRARY

* Increase required CMake version to 3.15 (windows only)
* Use
  https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html#prop_tgt:MSVC_RUNTIME_LIBRARY
  to select windows runtime
This commit is contained in:
Armin Novak
2023-11-08 15:18:34 +01:00
committed by Martin Fleisz
parent bd2ac8b11f
commit e0e72f9c28
12 changed files with 63 additions and 88 deletions

View File

@@ -61,7 +61,9 @@ set(CPACK_NSIS_MUI_UNICON "${PROJECT_SOURCE_DIR}/resource\\\\FreeRDP_Icon_96px.i
set(CPACK_COMPONENTS_ALL client server libraries headers symbols tools)
if(MSVC)
if(MSVC_RUNTIME STREQUAL "dynamic")
string(FIND ${CMAKE_MSVC_RUNTIME_LIBRARY} "DLL" IS_SHARED)
if(NOT IS_SHARED STREQUAL "-1")
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)