Mercurial > hg > orthanc
changeset 2688:c211c5cb501e jobs
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 28 Jun 2018 15:51:25 +0200 |
parents | fb2d89acc2d1 |
children | 0b64daab58a8 |
files | Resources/DownloadOrthancFramework.cmake |
diffstat | 1 files changed, 19 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/DownloadOrthancFramework.cmake Thu Jun 28 12:15:21 2018 +0200 +++ b/Resources/DownloadOrthancFramework.cmake Thu Jun 28 15:51:25 2018 +0200 @@ -63,27 +63,29 @@ set(ORTHANC_FRAMEWORK_MD5 "") - if (ORTHANC_FRAMEWORK_VERSION STREQUAL "mainline") - set(ORTHANC_FRAMEWORK_BRANCH "default") + if (NOT DEFINED ORTHANC_FRAMEWORK_BRANCH) + if (ORTHANC_FRAMEWORK_VERSION STREQUAL "mainline") + set(ORTHANC_FRAMEWORK_BRANCH "default") - else() - set(ORTHANC_FRAMEWORK_BRANCH "Orthanc-${ORTHANC_FRAMEWORK_VERSION}") + else() + set(ORTHANC_FRAMEWORK_BRANCH "Orthanc-${ORTHANC_FRAMEWORK_VERSION}") - set(RE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$") - string(REGEX REPLACE ${RE} "\\1" ORTHANC_FRAMEWORK_MAJOR ${ORTHANC_FRAMEWORK_VERSION}) - string(REGEX REPLACE ${RE} "\\2" ORTHANC_FRAMEWORK_MINOR ${ORTHANC_FRAMEWORK_VERSION}) - string(REGEX REPLACE ${RE} "\\3" ORTHANC_FRAMEWORK_REVISION ${ORTHANC_FRAMEWORK_VERSION}) + set(RE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$") + string(REGEX REPLACE ${RE} "\\1" ORTHANC_FRAMEWORK_MAJOR ${ORTHANC_FRAMEWORK_VERSION}) + string(REGEX REPLACE ${RE} "\\2" ORTHANC_FRAMEWORK_MINOR ${ORTHANC_FRAMEWORK_VERSION}) + string(REGEX REPLACE ${RE} "\\3" ORTHANC_FRAMEWORK_REVISION ${ORTHANC_FRAMEWORK_VERSION}) - if (NOT ORTHANC_FRAMEWORK_MAJOR MATCHES "^[0-9]+$" OR - NOT ORTHANC_FRAMEWORK_MINOR MATCHES "^[0-9]+$" OR - NOT ORTHANC_FRAMEWORK_REVISION MATCHES "^[0-9]+$") - message("Bad version of the Orthanc framework: ${ORTHANC_FRAMEWORK_VERSION}") - endif() + if (NOT ORTHANC_FRAMEWORK_MAJOR MATCHES "^[0-9]+$" OR + NOT ORTHANC_FRAMEWORK_MINOR MATCHES "^[0-9]+$" OR + NOT ORTHANC_FRAMEWORK_REVISION MATCHES "^[0-9]+$") + message("Bad version of the Orthanc framework: ${ORTHANC_FRAMEWORK_VERSION}") + endif() - if (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.3.1") - set(ORTHANC_FRAMEWORK_MD5 "dac95bd6cf86fb19deaf4e612961f378") - elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.3.2") - set(ORTHANC_FRAMEWORK_MD5 "d0ccdf68e855d8224331f13774992750") + if (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.3.1") + set(ORTHANC_FRAMEWORK_MD5 "dac95bd6cf86fb19deaf4e612961f378") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.3.2") + set(ORTHANC_FRAMEWORK_MD5 "d0ccdf68e855d8224331f13774992750") + endif() endif() endif() endif()