CMakeLists: Change MSVC14 variable to MSVC_VERSION

Use of the MSVC14 variable is discouraged in the CMake documentation
(which makes sense, since MSVC_VERSION is the more general appliable
variable).
This commit is contained in:
Lioncash 2018-08-11 19:36:19 -04:00 committed by zhupengfei
parent 5e658efdb8
commit b399186f18
No known key found for this signature in database
GPG Key ID: 85B82A3E62174206
1 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ find_package(Threads REQUIRED)
if (ENABLE_SDL2)
if (CITRA_USE_BUNDLED_SDL2)
# Detect toolchain and platform
if (MSVC14 AND ARCHITECTURE_x86_64)
if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
set(SDL2_VER "SDL2-2.0.5")
else()
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable CITRA_USE_BUNDLED_SDL2 and provide your own.")
@ -226,7 +226,7 @@ endif()
if (ENABLE_QT)
if (CITRA_USE_BUNDLED_QT)
if (MSVC14 AND ARCHITECTURE_x86_64)
if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
set(QT_VER qt-5.10.0-msvc2017_64)
else()
message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable CITRA_USE_BUNDLED_QT and provide your own.")