Mercurial > hg > orthanc
comparison OrthancFramework/Resources/CMake/DownloadOrthancFramework.cmake @ 4071:d6b7fb0f9652 framework
improved DownloadOrthancFramework.cmake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Jun 2020 12:26:45 +0200 |
parents | e00f3d089991 |
children | 99e2054d1e8d |
comparison
equal
deleted
inserted
replaced
4070:f1e82dd6acb1 | 4071:d6b7fb0f9652 |
---|---|
193 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}) | 193 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}) |
194 message(FATAL_ERROR "Non-existing directory: ${ORTHANC_FRAMEWORK_ROOT}") | 194 message(FATAL_ERROR "Non-existing directory: ${ORTHANC_FRAMEWORK_ROOT}") |
195 endif() | 195 endif() |
196 | 196 |
197 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) | 197 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) |
198 message(FATAL_ERROR "Directory not containing the source code of Orthanc: ${ORTHANC_FRAMEWORK_ROOT}") | 198 message(FATAL_ERROR "Directory not containing the source code of the Orthanc framework: ${ORTHANC_FRAMEWORK_ROOT}") |
199 endif() | 199 endif() |
200 | |
201 set(ORTHANC_ROOT ${ORTHANC_FRAMEWORK_ROOT}) | |
202 endif() | 200 endif() |
203 | 201 |
204 | 202 |
205 | 203 |
206 ## | 204 ## |
243 ) | 241 ) |
244 | 242 |
245 if (Failure) | 243 if (Failure) |
246 message(FATAL_ERROR "Error while running Mercurial") | 244 message(FATAL_ERROR "Error while running Mercurial") |
247 endif() | 245 endif() |
246 | |
247 unset(ORTHANC_FRAMEWORK_ROOT CACHE) | |
248 set(ORTHANC_FRAMEWORK_ROOT "${ORTHANC_ROOT}/OrthancFramework" CACHE | |
249 STRING "Path to the Orthanc framework source directory") | |
250 | |
251 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) | |
252 message(FATAL_ERROR "Directory not containing the source code of the Orthanc framework: ${ORTHANC_ROOT}") | |
253 endif() | |
254 | |
255 unset(ORTHANC_ROOT) | |
248 endif() | 256 endif() |
249 | 257 |
250 | 258 |
251 | 259 |
252 ## | 260 ## |
370 | 378 |
371 if (NOT IS_DIRECTORY "${ORTHANC_ROOT}") | 379 if (NOT IS_DIRECTORY "${ORTHANC_ROOT}") |
372 message(FATAL_ERROR "The Orthanc framework was not uncompressed at the proper location. Check the CMake instructions.") | 380 message(FATAL_ERROR "The Orthanc framework was not uncompressed at the proper location. Check the CMake instructions.") |
373 endif() | 381 endif() |
374 endif() | 382 endif() |
383 | |
384 unset(ORTHANC_FRAMEWORK_ROOT CACHE) | |
385 set(ORTHANC_FRAMEWORK_ROOT "${ORTHANC_ROOT}/OrthancFramework" CACHE | |
386 STRING "Path to the Orthanc framework source directory") | |
387 | |
388 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) | |
389 message(FATAL_ERROR "Directory not containing the source code of the Orthanc framework: ${ORTHANC_ROOT}") | |
390 endif() | |
391 | |
392 unset(ORTHANC_ROOT) | |
375 endif() | 393 endif() |
376 | 394 |
377 | 395 |
378 | 396 |
379 ## | 397 ## |