changeset 4166:ad64038bcbc5

Fix CMake Policy CMP0058
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Aug 2020 14:59:15 +0200
parents d0f9e29a751b
children 8517c47eedd2
files OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake	Mon Aug 24 07:51:38 2020 +0200
+++ b/OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake	Thu Aug 27 14:59:15 2020 +0200
@@ -169,6 +169,16 @@
       DICTIONARY_PRIVATE ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic
       DICTIONARY_DICONDE ${DCMTK_SOURCES_DIR}/dcmdata/data/diconde.dic
       )
+    
+    # Fix CMake Policy CMP0058 (related to ninja) by creating a phony
+    # target for files coming from downloaded packages
+    add_custom_command(
+      OUTPUT
+      ${DCMTK_SOURCES_DIR}/dcmdata/data/dicom.dic
+      ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic
+      ${DCMTK_SOURCES_DIR}/dcmdata/data/diconde.dic
+      COMMAND ${CMAKE_COMMAND} -E echo_append ""
+      )
   else()
     set(DCMTK_USE_EMBEDDED_DICTIONARIES 0)
   endif()