From 23f378cd9353abe1d0670be37b73802a394b625c Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Tue, 17 Sep 2019 12:51:05 -0500 Subject: [PATCH] Support VS 2019 - courtesy of Lars Toenning --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf5c425c..7710db08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,15 +173,17 @@ if (MSVC AND MSVC_3RDPARTY_ROOT) set( OSG_MSVC "msvc" ) if (${MSVC_VERSION_MAJOR} EQUAL "19") - if (${MSVC_VERSION_MINOR} EQUAL "00") - set( OSG_MSVC ${OSG_MSVC}140 ) - else () + if (${MSVC_VERSION_MINOR} GREATER_EQUAL "20") + set( OSG_MSVC ${OSG_MSVC}142 ) + elseif (${MSVC_VERSION_MINOR} GREATER_EQUAL "10") set( OSG_MSVC ${OSG_MSVC}141 ) + else () + set( OSG_MSVC ${OSG_MSVC}140 ) endif () elseif (${MSVC_VERSION_MAJOR} EQUAL "18") set( OSG_MSVC ${OSG_MSVC}120 ) else () - message(FATAL_ERROR "Visual Studio 2013/15/17 is required") + message(FATAL_ERROR "Visual Studio 2013 or higher is required") endif () if (CMAKE_CL_64)