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)