Mercurial > hg > orthanc
comparison Resources/CMake/DcmtkConfiguration.cmake @ 3839:5bba4d249422 transcoding
integration mainline->transcoding
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 15 Apr 2020 22:03:21 +0200 |
parents | 4a25727401cd a3e38994d95a |
children | d86bddb50972 |
comparison
equal
deleted
inserted
replaced
3829:4fde7933e504 | 3839:5bba4d249422 |
---|---|
146 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) | 146 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) |
147 endif() | 147 endif() |
148 | 148 |
149 | 149 |
150 else() | 150 else() |
151 # The following line allows to manually add libraries at the | 151 if (CMAKE_CROSSCOMPILING AND |
152 # command-line, which is necessary for Ubuntu/Debian packages | 152 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg") |
153 set(tmp "${DCMTK_LIBRARIES}") | 153 |
154 include(FindDCMTK) | 154 CHECK_INCLUDE_FILE_CXX(dcmtk/dcmdata/dcfilefo.h HAVE_DCMTK_H) |
155 list(APPEND DCMTK_LIBRARIES "${tmp}") | 155 if (NOT HAVE_DCMTK_H) |
156 | 156 message(FATAL_ERROR "Please install the libdcmtk-dev package") |
157 include_directories(${DCMTK_INCLUDE_DIRS}) | 157 endif() |
158 | |
159 CHECK_LIBRARY_EXISTS(dcmdata "dcmDataDict" "" HAVE_DCMTK_LIB) | |
160 if (NOT HAVE_DCMTK_LIB) | |
161 message(FATAL_ERROR "Please install the libdcmtk package") | |
162 endif() | |
163 | |
164 find_path(DCMTK_INCLUDE_DIRS dcmtk/config/osconfig.h | |
165 /usr/include | |
166 ) | |
167 | |
168 link_libraries(dcmdata dcmnet dcmjpeg oflog ofstd) | |
169 | |
170 else() | |
171 # The following line allows to manually add libraries at the | |
172 # command-line, which is necessary for Ubuntu/Debian packages | |
173 set(tmp "${DCMTK_LIBRARIES}") | |
174 include(FindDCMTK) | |
175 list(APPEND DCMTK_LIBRARIES "${tmp}") | |
176 | |
177 include_directories(${DCMTK_INCLUDE_DIRS}) | |
178 endif() | |
158 | 179 |
159 add_definitions( | 180 add_definitions( |
160 -DHAVE_CONFIG_H=1 | 181 -DHAVE_CONFIG_H=1 |
161 ) | 182 ) |
162 | 183 |
223 | 244 |
224 if (${DCMTK_DICTIONARY_DIR_AUTO} MATCHES "DCMTK_DICTIONARY_DIR_AUTO-NOTFOUND") | 245 if (${DCMTK_DICTIONARY_DIR_AUTO} MATCHES "DCMTK_DICTIONARY_DIR_AUTO-NOTFOUND") |
225 message(FATAL_ERROR "Cannot locate the DICOM dictionary on this system") | 246 message(FATAL_ERROR "Cannot locate the DICOM dictionary on this system") |
226 endif() | 247 endif() |
227 | 248 |
249 if (CMAKE_CROSSCOMPILING AND | |
250 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg") | |
251 # Remove the sysroot prefix | |
252 file(RELATIVE_PATH tmp ${CMAKE_FIND_ROOT_PATH} ${DCMTK_DICTIONARY_DIR_AUTO}) | |
253 set(DCMTK_DICTIONARY_DIR_AUTO /${tmp} CACHE INTERNAL "") | |
254 endif() | |
255 | |
228 message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}") | 256 message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}") |
229 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR_AUTO}") | 257 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR_AUTO}") |
230 else() | 258 else() |
231 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR}") | 259 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR}") |
232 endif() | 260 endif() |