DCMTK.cmake 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #
  2. # DCMTK
  3. #
  4. SET(DCMTK_DEPENDS)
  5. ctkMacroShouldAddExternalProject(DCMTK_LIBRARIES add_project)
  6. IF(${add_project})
  7. # Sanity checks
  8. IF(DEFINED DCMTK_DIR AND NOT EXISTS ${DCMTK_DIR})
  9. MESSAGE(FATAL_ERROR "DCMTK_DIR variable is defined but corresponds to non-existing directory")
  10. ENDIF()
  11. IF(NOT DEFINED DCMTK_DIR)
  12. SET(proj DCMTK)
  13. # MESSAGE(STATUS "Adding project:${proj}")
  14. SET(DCMTK_DEPENDS ${proj})
  15. ExternalProject_Add(${proj}
  16. GIT_REPOSITORY "${git_protocol}://github.com/commontk/DCMTK.git"
  17. CMAKE_GENERATOR ${gen}
  18. BUILD_COMMAND ""
  19. CMAKE_ARGS
  20. ${ep_common_args}
  21. -DDCMTK_BUILD_APPS:BOOL=ON # Build also dmctk tools (movescu, storescp, ...)
  22. )
  23. SET(DCMTK_DIR ${ep_install_dir})
  24. ExternalProject_Add_Step(${proj} force_rebuild
  25. COMMENT "Force ${proj} re-build"
  26. DEPENDERS build # Steps that depend on this step
  27. ALWAYS 1
  28. WORKING_DIRECTORY ${ep_build_dir}/${proj}
  29. )
  30. # Since DCMTK is statically build, there is not need to add its corresponding
  31. # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
  32. ENDIF()
  33. ENDIF()