Mercurial > hg > orthanc
changeset 89:74156c8b6f00
dynamic zlib
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 26 Sep 2012 18:01:41 +0200 |
parents | 8936a3bbb129 |
children | 10184c6eabc0 |
files | Resources/CMake/ZlibConfiguration.cmake |
diffstat | 1 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/ZlibConfiguration.cmake Wed Sep 26 17:52:26 2012 +0200 +++ b/Resources/CMake/ZlibConfiguration.cmake Wed Sep 26 18:01:41 2012 +0200 @@ -1,11 +1,17 @@ -if (ON) #(${STATIC_BUILD}) - SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.7) - DownloadPackage("http://zlib.net/zlib-1.2.7.tar.gz" "${ZLIB_SOURCES_DIR}" "${ZLIB_PRELOADED}" "") +SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.7) +DownloadPackage("http://zlib.net/zlib-1.2.7.tar.gz" "${ZLIB_SOURCES_DIR}" "${ZLIB_PRELOADED}" "") + +include_directories( + ${ZLIB_SOURCES_DIR} + ) - include_directories( - ${ZLIB_SOURCES_DIR} - ) +# This is the minizip distribution to create ZIP files +list(APPEND THIRD_PARTY_SOURCES + ${ZLIB_SOURCES_DIR}/contrib/minizip/ioapi.c + ${ZLIB_SOURCES_DIR}/contrib/minizip/zip.c + ) +if (${STATIC_BUILD}) list(APPEND THIRD_PARTY_SOURCES ${ZLIB_SOURCES_DIR}/adler32.c ${ZLIB_SOURCES_DIR}/compress.c @@ -22,14 +28,12 @@ ${ZLIB_SOURCES_DIR}/trees.c ${ZLIB_SOURCES_DIR}/uncompr.c ${ZLIB_SOURCES_DIR}/zutil.c - ${ZLIB_SOURCES_DIR}/contrib/minizip/ioapi.c - ${ZLIB_SOURCES_DIR}/contrib/minizip/zip.c ) - source_group(ThirdParty\\ZLib REGULAR_EXPRESSION ${ZLIB_SOURCES_DIR}/.*) - else() include(FindZLIB) include_directories(${ZLIB_INCLUDE_DIRS}) link_libraries(${ZLIB_LIBRARIES}) endif() + +source_group(ThirdParty\\ZLib REGULAR_EXPRESSION ${ZLIB_SOURCES_DIR}/.*)