diff --git a/CMakeLists.txt b/CMakeLists.txt index fabee91f..d197c499 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,10 @@ if (CMAKE_COMPILER_IS_GNUCXX) endif (CMAKE_SYSTEM_NAME MATCHES Linux) endif (CMAKE_COMPILER_IS_GNUCXX) if(MSVC) - add_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE ) + if (MSVC_VERSION GREATER 1399) + # If using Visual C++ 2005 (MSVC80) and greater (MSVC_VERSION=1400) + add_definitions(/D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t-) + endif (MSVC_VERSION GREATER 1399) endif(MSVC) if (WIN32) set(CMAKE_DEBUG_POSTFIX "d")