changeset 17:e707b2cd6608

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Nov 2016 10:00:12 +0100
parents ff1e935768e7
children 61bcf35d4761
files Resources/Orthanc/Resources/CMake/Compiler.cmake
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/Orthanc/Resources/CMake/Compiler.cmake	Wed Nov 09 20:06:52 2016 +0100
+++ b/Resources/Orthanc/Resources/CMake/Compiler.cmake	Thu Nov 10 10:00:12 2016 +0100
@@ -41,7 +41,17 @@
     -D_CRT_SECURE_NO_WARNINGS=1
     -D_CRT_SECURE_NO_DEPRECATE=1
     )
-  include_directories(${ORTHANC_ROOT}/Resources/ThirdParty/VisualStudio)
+
+  if (MSVC_VERSION LESS 1600)
+    # Starting with Visual Studio >= 2010 (i.e. macro _MSC_VER >=
+    # 1600), Microsoft ships a standard-compliant <stdint.h>
+    # header. For earlier versions of Visual Studio, give access to a
+    # compatibility header.
+    # http://stackoverflow.com/a/70630/881731
+    # https://en.wikibooks.org/wiki/C_Programming/C_Reference/stdint.h#External_links
+    include_directories(${ORTHANC_ROOT}/Resources/ThirdParty/VisualStudio)
+  endif()
+
   link_libraries(netapi32)
 endif()