Mercurial > hg > orthanc-dicomweb
changeset 50:69b004011c4b
fix windows build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 02 Aug 2015 12:12:06 +0200 |
parents | b8b1ea028da9 |
children | cb730ce687a8 |
files | CMakeLists.txt Orthanc/Resources/CMake/ZlibConfiguration.cmake Plugin/Wado.cpp Resources/SyncOrthancFolder.py |
diffstat | 4 files changed, 47 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Sun Aug 02 11:14:19 2015 +0200 +++ b/CMakeLists.txt Sun Aug 02 12:12:06 2015 +0200 @@ -34,6 +34,7 @@ set(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp") set(USE_SYSTEM_LIBJPEG ON CACHE BOOL "Use the system version of libjpeg") set(USE_SYSTEM_LIBPNG ON CACHE BOOL "Use the system version of libpng") +set(USE_SYSTEM_ZLIB ON CACHE BOOL "Use the system version of zlib") SET(USE_SYSTEM_PUGIXML ON CACHE BOOL "Use the system version of Pugixml") # Distribution-specific settings @@ -53,6 +54,7 @@ include(${ORTHANC_ROOT}/Resources/CMake/GoogleTestConfiguration.cmake) include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake) include(${ORTHANC_ROOT}/Resources/CMake/LibPngConfiguration.cmake) +include(${ORTHANC_ROOT}/Resources/CMake/ZlibConfiguration.cmake) include(${ORTHANC_ROOT}/Resources/CMake/PugixmlConfiguration.cmake) include(${CMAKE_SOURCE_DIR}/Resources/CMake/GdcmConfiguration.cmake) @@ -107,6 +109,7 @@ ${JSONCPP_SOURCES} ${LIBJPEG_SOURCES} ${LIBPNG_SOURCES} + ${ZLIB} ${PUGIXML_SOURCES} ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Orthanc/Resources/CMake/ZlibConfiguration.cmake Sun Aug 02 12:12:06 2015 +0200 @@ -0,0 +1,42 @@ +# This is the minizip distribution to create ZIP files +set(ZLIB_SOURCES + ${ORTHANC_ROOT}/Resources/ThirdParty/minizip/ioapi.c + ${ORTHANC_ROOT}/Resources/ThirdParty/minizip/zip.c + ) + +if (STATIC_BUILD OR NOT USE_SYSTEM_ZLIB) + SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.7) + DownloadPackage( + "60df6a37c56e7c1366cca812414f7b85" + "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/zlib-1.2.7.tar.gz" + "${ZLIB_SOURCES_DIR}") + + include_directories( + ${ZLIB_SOURCES_DIR} + ) + + list(APPEND ZLIB_SOURCES + ${ZLIB_SOURCES_DIR}/adler32.c + ${ZLIB_SOURCES_DIR}/compress.c + ${ZLIB_SOURCES_DIR}/crc32.c + ${ZLIB_SOURCES_DIR}/deflate.c + ${ZLIB_SOURCES_DIR}/gzclose.c + ${ZLIB_SOURCES_DIR}/gzlib.c + ${ZLIB_SOURCES_DIR}/gzread.c + ${ZLIB_SOURCES_DIR}/gzwrite.c + ${ZLIB_SOURCES_DIR}/infback.c + ${ZLIB_SOURCES_DIR}/inffast.c + ${ZLIB_SOURCES_DIR}/inflate.c + ${ZLIB_SOURCES_DIR}/inftrees.c + ${ZLIB_SOURCES_DIR}/trees.c + ${ZLIB_SOURCES_DIR}/uncompr.c + ${ZLIB_SOURCES_DIR}/zutil.c + ) + +else() + include(FindZLIB) + include_directories(${ZLIB_INCLUDE_DIRS}) + link_libraries(${ZLIB_LIBRARIES}) +endif() + +source_group(ThirdParty\\ZLib REGULAR_EXPRESSION ${ZLIB_SOURCES_DIR}/.*)
--- a/Plugin/Wado.cpp Sun Aug 02 11:14:19 2015 +0200 +++ b/Plugin/Wado.cpp Sun Aug 02 12:12:06 2015 +0200 @@ -178,7 +178,7 @@ { std::string uri = "/instances/" + instance + "/preview"; - if (OrthancPlugins::RestApiGetString(png, context_, uri)) + if (OrthancPlugins::RestApiGetString(png, context_, uri, true)) { return true; }
--- a/Resources/SyncOrthancFolder.py Sun Aug 02 11:14:19 2015 +0200 +++ b/Resources/SyncOrthancFolder.py Sun Aug 02 12:12:06 2015 +0200 @@ -38,6 +38,7 @@ 'Resources/CMake/GoogleTestConfiguration.cmake', 'Resources/CMake/JsonCppConfiguration.cmake', 'Resources/CMake/LibPngConfiguration.cmake', + 'Resources/CMake/ZlibConfiguration.cmake', 'Resources/CMake/PugixmlConfiguration.cmake', 'Resources/MinGW-W64-Toolchain32.cmake', 'Resources/MinGW-W64-Toolchain64.cmake',