Fix for windows + older linux distros

This commit is contained in:
Jammyjamjamman 2021-07-03 13:44:21 +01:00 committed by James Sherratt
parent db8d2dd355
commit cbb4b261a8
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
CMAKE_MINIMUM_REQUIRED( VERSION 3.10 )
IF(WIN32)
# Windows cmake version needs to be higher - for CMAKE_MSVC_RUNTIME_LIBRARY.
CMAKE_MINIMUM_REQUIRED( VERSION 3.15 )
STRING(SUBSTRING ${CMAKE_GENERATOR} 0 13 GENERATOR_TYPE)
SET(VS_BUILD GENERATOR_TYPE STREQUAL "Visual Studio" CACHE STRING "Target visual studio.")
IF(VS_BUILD)
@ -30,6 +31,8 @@ IF(WIN32)
INCLUDE(FindPkgConfig)
ENDIF()
ELSE()
CMAKE_MINIMUM_REQUIRED( VERSION 3.5 )
ENDIF()
PROJECT( MegaGlest )