Mercurial > hg > orthanc-wsi
comparison Resources/CMake/LibTiffConfiguration.cmake @ 52:5f0c6f3871a3
fix for msvc
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Nov 2016 22:47:14 +0100 |
parents | 2e5db9b72a7b |
children | d101055fc20b |
comparison
equal
deleted
inserted
replaced
51:742ecdb006a1 | 52:5f0c6f3871a3 |
---|---|
17 # if !defined(ssize_t) | 17 # if !defined(ssize_t) |
18 # define WIN32_LEAN_AND_MEAN | 18 # define WIN32_LEAN_AND_MEAN |
19 # include <windows.h> | 19 # include <windows.h> |
20 # define ssize_t SSIZE_T | 20 # define ssize_t SSIZE_T |
21 # endif | 21 # endif |
22 # if !defined(snprintf) | 22 # if !defined(snprintf) && (_MSC_VER < 1900) |
23 # define snprintf _snprintf | 23 # define snprintf _snprintf |
24 # endif | 24 # endif |
25 #endif | 25 #endif |
26 | 26 |
27 #include <stdint.h> | 27 #include <stdint.h> |
49 -DHAVE_IEEEFP=1 | 49 -DHAVE_IEEEFP=1 |
50 -DHOST_FILLORDER=${TIFF_FILLORDER} | 50 -DHOST_FILLORDER=${TIFF_FILLORDER} |
51 -DHAVE_SNPRINTF=1 | 51 -DHAVE_SNPRINTF=1 |
52 -DJPEG_SUPPORT=1 | 52 -DJPEG_SUPPORT=1 |
53 -DLZW_SUPPORT=1 | 53 -DLZW_SUPPORT=1 |
54 ) | |
54 | 55 |
55 -DTIFF_INT64_FORMAT="%lld" | 56 if (MSVC) |
56 -DTIFF_UINT64_FORMAT="%llu" | 57 # The "%" must be escaped if using Visual Studio |
57 -DTIFF_SSIZE_FORMAT="%d" | 58 add_definitions( |
58 ) | 59 -DTIFF_INT64_FORMAT="%%lld" |
60 -DTIFF_UINT64_FORMAT="%%llu" | |
61 -DTIFF_SSIZE_FORMAT="%%d" | |
62 ) | |
63 else() | |
64 add_definitions( | |
65 -DTIFF_INT64_FORMAT="%lld" | |
66 -DTIFF_UINT64_FORMAT="%llu" | |
67 -DTIFF_SSIZE_FORMAT="%d" | |
68 ) | |
69 endif() | |
59 | 70 |
60 set(LIBTIFF_SOURCES | 71 set(LIBTIFF_SOURCES |
61 #${LIBTIFF_SOURCES_DIR}/libtiff/mkg3states.c | 72 #${LIBTIFF_SOURCES_DIR}/libtiff/mkg3states.c |
62 ${LIBTIFF_SOURCES_DIR}/libtiff/tif_aux.c | 73 ${LIBTIFF_SOURCES_DIR}/libtiff/tif_aux.c |
63 ${LIBTIFF_SOURCES_DIR}/libtiff/tif_close.c | 74 ${LIBTIFF_SOURCES_DIR}/libtiff/tif_close.c |