Mercurial > hg > orthanc
diff Resources/CMake/Compiler.cmake @ 1560:307b9ea6c39b
fixes for Visual Studio 2013 and QtCreator
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Aug 2015 11:43:24 +0200 |
parents | 5ddbadd17cde |
children | 158e7b6f859a fe458dde986e |
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake Fri Aug 21 10:12:56 2015 +0200 +++ b/Resources/CMake/Compiler.cmake Fri Aug 21 11:43:24 2015 +0200 @@ -69,8 +69,24 @@ endif() elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + if (MSVC) + message("MSVC compiler version = " ${MSVC_VERSION} "\n") + # Starting Visual Studio 2013 (version 1800), it is not possible + # to target Windows XP anymore + if (MSVC_VERSION LESS 1800) + add_definitions( + -DWINVER=0x0501 + -D_WIN32_WINNT=0x0501 + ) + endif() + else() + add_definitions( + -DWINVER=0x0501 + -D_WIN32_WINNT=0x0501 + ) + endif() + add_definitions( - -DWINVER=0x0501 -D_CRT_SECURE_NO_WARNINGS=1 ) link_libraries(rpcrt4 ws2_32)