changeset 310:348e00b837b9

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 01 Oct 2018 10:46:26 +0200
parents dd951b6afd08
children ce48c3b3b0e9
files Resources/Orthanc/DownloadOrthancFramework.cmake
diffstat 1 files changed, 23 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/Orthanc/DownloadOrthancFramework.cmake	Tue Sep 25 18:12:30 2018 +0200
+++ b/Resources/Orthanc/DownloadOrthancFramework.cmake	Mon Oct 01 10:46:26 2018 +0200
@@ -63,27 +63,33 @@
 
   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")
+      elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.4.0")
+        set(ORTHANC_FRAMEWORK_MD5 "81e15f34d97ac32bbd7d26e85698835a")
+      elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.4.2")
+        set(ORTHANC_FRAMEWORK_MD5 "d1ee84927dcf668e60eb5868d24b9394")
+      endif()
     endif()
   endif()
 endif()