From bceb942ffafcb2669bd3aa6b82e86999aa5a1c34 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Mon, 3 Sep 2012 17:34:01 +0200 Subject: [PATCH] Support MS VS2012 --- CMakeLists.txt | 4 ++-- CMakeModules/ConfigureMsvc3rdParty.cmake | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 955020537..5f014f230 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,9 +237,9 @@ if(WIN32) # endforeach(warning) set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS") - if (${MSVC_VERSION} EQUAL 1600) + if (${MSVC_VERSION} GREATER 1599) set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" ) - endif (${MSVC_VERSION} EQUAL 1600) + endif (${MSVC_VERSION} GREATER 1599) endif(MSVC) set(NOMINMAX 1) diff --git a/CMakeModules/ConfigureMsvc3rdParty.cmake b/CMakeModules/ConfigureMsvc3rdParty.cmake index f46d51d06..8466184d0 100644 --- a/CMakeModules/ConfigureMsvc3rdParty.cmake +++ b/CMakeModules/ConfigureMsvc3rdParty.cmake @@ -20,11 +20,13 @@ endif (MSVC) if (MSVC AND MSVC_3RDPARTY_ROOT) message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}") set( OSG_MSVC "msvc" ) - if (${MSVC_VERSION} EQUAL 1600) + if (${MSVC_VERSION} EQUAL 1700) + set( OSG_MSVC ${OSG_MSVC}110 ) + elseif (${MSVC_VERSION} EQUAL 1600) set( OSG_MSVC ${OSG_MSVC}100 ) - else (${MSVC_VERSION} EQUAL 1600) + else (${MSVC_VERSION} EQUAL 1700) set( OSG_MSVC ${OSG_MSVC}90 ) - endif (${MSVC_VERSION} EQUAL 1600) + endif (${MSVC_VERSION} EQUAL 1700) if (CMAKE_CL_64) set( OSG_MSVC ${OSG_MSVC}-64 ) set( MSVC_3RDPARTY_DIR 3rdParty.x64 )