Mercurial > hg > orthanc
diff Resources/CMake/DcmtkConfiguration.cmake @ 1785:c131566b8252 dcmtk-3.6.1
integration mainline->dcmtk-3.6.1
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 18 Nov 2015 10:16:21 +0100 |
parents | 1b82bb0446d2 6473e4e22d44 |
children | 4f2386d0f326 |
line wrap: on
line diff
--- a/Resources/CMake/DcmtkConfiguration.cmake Wed Sep 23 10:29:06 2015 +0200 +++ b/Resources/CMake/DcmtkConfiguration.cmake Wed Nov 18 10:16:21 2015 +0100 @@ -1,18 +1,3 @@ -# Lookup for DICOM dictionaries, if none is specified by the user -if (DCMTK_DICTIONARY_DIR STREQUAL "") - find_path(DCMTK_DICTIONARY_DIR_AUTO dicom.dic - /usr/share/dcmtk - /usr/share/libdcmtk2 - /usr/local/share/dcmtk - ) - - message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}") - add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR_AUTO}") -else() - add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR}") -endif() - - if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK) SET(DCMTK_VERSION_NUMBER 361) set(DCMTK_PACKAGE_VERSION "3.6.1") @@ -166,17 +151,16 @@ set(DCMTK_BUNDLES_LOG4CPLUS 1) if (STANDALONE_BUILD) - add_definitions(-DDCMTK_USE_EMBEDDED_DICTIONARIES=1) + set(DCMTK_USE_EMBEDDED_DICTIONARIES 1) + set(DCMTK_DICTIONARIES + DICTIONARY_DICOM ${DCMTK_SOURCES_DIR}/dcmdata/data/dicom.dic + DICTIONARY_PRIVATE ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic + DICTIONARY_DICONDE ${DCMTK_SOURCES_DIR}/dcmdata/data/diconde.dic + ) else() - add_definitions(-DDCMTK_USE_EMBEDDED_DICTIONARIES=0) + set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) endif() - set(DCMTK_DICTIONARIES - DICTIONARY_DICOM ${DCMTK_SOURCES_DIR}/dcmdata/data/dicom.dic - DICTIONARY_PRIVATE ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic - DICTIONARY_DICONDE ${DCMTK_SOURCES_DIR}/dcmdata/data/diconde.dic - ) - else() # The following line allows to manually add libraries at the # command-line, which is necessary for Ubuntu/Debian packages @@ -210,9 +194,32 @@ DCMTK_VERSION_NUMBER ${DCMTK_VERSION_NUMBER1}) - add_definitions(-DDCMTK_USE_EMBEDDED_DICTIONARIES=0) + set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) +endif() -endif() add_definitions(-DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER}) message("DCMTK version: ${DCMTK_VERSION_NUMBER}") + + +add_definitions(-DDCMTK_USE_EMBEDDED_DICTIONARIES=${DCMTK_USE_EMBEDDED_DICTIONARIES}) +if (NOT DCMTK_USE_EMBEDDED_DICTIONARIES) + # Lookup for DICOM dictionaries, if none is specified by the user + if (DCMTK_DICTIONARY_DIR STREQUAL "") + find_path(DCMTK_DICTIONARY_DIR_AUTO dicom.dic + /usr/share/dcmtk + /usr/share/libdcmtk2 + /usr/share/libdcmtk4 + /usr/local/share/dcmtk + ) + + if (${DCMTK_DICTIONARY_DIR_AUTO} MATCHES "DCMTK_DICTIONARY_DIR_AUTO-NOTFOUND") + message(FATAL_ERROR "Cannot locate the DICOM dictionary on this system") + endif() + + message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}") + add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR_AUTO}") + else() + add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR}") + endif() +endif()