| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 | 
							- #
 
- # DCMTK
 
- #
 
- set(proj DCMTK)
 
- set(${proj}_DEPENDENCIES "")
 
- ExternalProject_Include_Dependencies(${proj}
 
-   PROJECT_VAR proj
 
-   DEPENDS_VAR ${proj}_DEPENDENCIES
 
-   EP_ARGS_VAR ${proj}_EXTERNAL_PROJECT_ARGS
 
-   USE_SYSTEM_VAR ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}
 
-   )
 
- if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
 
-   unset(DCMTK_DIR CACHE)
 
-   find_package(DCMTK REQUIRED)
 
- endif()
 
- # Sanity checks
 
- if(DEFINED DCMTK_DIR AND NOT EXISTS ${DCMTK_DIR})
 
-   message(FATAL_ERROR "DCMTK_DIR variable is defined but corresponds to non-existing directory")
 
- endif()
 
- if(NOT DEFINED DCMTK_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
 
-   set(revision_tag ae3b946f6e6231)
 
-   if(${proj}_REVISION_TAG)
 
-     set(revision_tag ${${proj}_REVISION_TAG})
 
-   endif()
 
-   set(location_args )
 
-   if(${proj}_URL)
 
-     set(location_args URL ${${proj}_URL})
 
-   elseif(${proj}_GIT_REPOSITORY)
 
-     set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
 
-                       GIT_TAG ${revision_tag})
 
-   else()
 
-     set(location_args GIT_REPOSITORY "${git_protocol}://git.dcmtk.org/dcmtk.git"
 
-                       GIT_TAG ${revision_tag})
 
-   endif()
 
-   set(ep_project_include_arg)
 
-   if(CTEST_USE_LAUNCHERS)
 
-     set(ep_project_include_arg
 
-       "-DCMAKE_PROJECT_DCMTK_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake")
 
-   endif()
 
-   ExternalProject_Add(${proj}
 
-     ${${proj}_EXTERNAL_PROJECT_ARGS}
 
-     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
 
-     BINARY_DIR ${proj}-build
 
-     PREFIX ${proj}${ep_suffix}
 
-     ${location_args}
 
-     INSTALL_COMMAND ""
 
-     CMAKE_ARGS
 
-       -DDCMTK_INSTALL_BINDIR:STRING=bin/${CMAKE_CFG_INTDIR}
 
-       -DDCMTK_INSTALL_LIBDIR:STRING=lib/${CMAKE_CFG_INTDIR}
 
-     CMAKE_CACHE_ARGS
 
-       ${ep_common_cache_args}
 
-       ${ep_project_include_arg}
 
-       -DBUILD_SHARED_LIBS:BOOL=ON
 
-       -DDCMTK_WITH_DOXYGEN:BOOL=OFF
 
-       -DDCMTK_WITH_ZLIB:BOOL=OFF # see github issue #25
 
-       -DDCMTK_WITH_OPENSSL:BOOL=OFF # see github issue #25
 
-       -DDCMTK_WITH_PNG:BOOL=OFF # see github issue #25
 
-       -DDCMTK_WITH_TIFF:BOOL=OFF  # see github issue #25
 
-       -DDCMTK_WITH_XML:BOOL=OFF  # see github issue #25
 
-       -DDCMTK_WITH_ICONV:BOOL=OFF  # see github issue #178
 
-       -DDCMTK_FORCE_FPIC_ON_UNIX:BOOL=ON
 
-       -DDCMTK_OVERWRITE_WIN32_COMPILER_FLAGS:BOOL=OFF
 
-     DEPENDS
 
-       ${${proj}_DEPENDENCIES}
 
-     )
 
-   set(DCMTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build)
 
- else()
 
-   ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
 
- endif()
 
- mark_as_superbuild(
 
-   VARS DCMTK_DIR:PATH
 
-   LABELS "FIND_PACKAGE"
 
-   )
 
- # If an external DCMTK was provided via DCMTK_DIR and the external DCMTK
 
- # build/install used a CMAKE_DEBUG_POSTFIX value for distinguishing debug
 
- # and release libraries in the same build/install tree, the same debug
 
- # postfix needs to be passed to the CTK configure step. The FindDCMTK
 
- # script then takes the DCMTK_CMAKE_DEBUG_POSTFIX variable into account
 
- # when looking for DCMTK debug libraries.
 
- mark_as_superbuild(DCMTK_CMAKE_DEBUG_POSTFIX:STRING)
 
 
  |