changeset 27:2e5db9b72a7b

fix msvc
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Oct 2016 13:02:57 +0200
parents 952b2c6ee0a2
children 779b7ce35a0f
files Applications/CMakeLists.txt Resources/CMake/LibTiffConfiguration.cmake
diffstat 2 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/CMakeLists.txt	Thu Oct 27 12:47:32 2016 +0200
+++ b/Applications/CMakeLists.txt	Thu Oct 27 13:02:57 2016 +0200
@@ -207,17 +207,17 @@
 
   # Mandatory components
   ${BOOST_SOURCES}
+  ${CURL_SOURCES}
+  ${DCMTK_SOURCES}
   ${JSONCPP_SOURCES}
-  ${ZLIB_SOURCES}
+  ${LIBJPEG_SOURCES}
   ${LIBPNG_SOURCES}
-  ${LIBJPEG_SOURCES}
-  ${DCMTK_SOURCES}
   ${LIBTIFF_SOURCES}
   ${OPENJPEG_SOURCES}
+  ${ZLIB_SOURCES}
 
   # Optional components
   ${OPENSSL_SOURCES}
-  ${CURL_SOURCES}
   )
 
 
--- a/Resources/CMake/LibTiffConfiguration.cmake	Thu Oct 27 12:47:32 2016 +0200
+++ b/Resources/CMake/LibTiffConfiguration.cmake	Thu Oct 27 13:02:57 2016 +0200
@@ -14,9 +14,14 @@
 ")
     file(WRITE ${LIBTIFF_SOURCES_DIR}/libtiff/tiffconf.h "
 #if defined(_MSC_VER)
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
-typedef SSIZE_T ssize_t;
+#  if !defined(ssize_t)
+#    define WIN32_LEAN_AND_MEAN
+#    include <windows.h>
+#    define ssize_t SSIZE_T
+#  endif
+#  if !defined(snprintf)
+#    define snprintf _snprintf
+#  endif
 #endif
 
 #include <stdint.h>