annotate OrthancFramework/Resources/CMake/DownloadOrthancFramework.cmake @ 4052:9fa06bddaabe framework

fix p11
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Jun 2020 12:21:45 +0200
parents d25f4c0fa160
children e00f3d089991
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Department, University Hospital of Liege, Belgium
3640
94f4a18a79cc upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3542
diff changeset
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 #
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 # This program is free software: you can redistribute it and/or
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 # modify it under the terms of the GNU General Public License as
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # published by the Free Software Foundation, either version 3 of the
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # License, or (at your option) any later version.
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 #
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # In addition, as a special exception, the copyright holders of this
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # program give permission to link the code of its release with the
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # OpenSSL project's "OpenSSL" library (or with modified versions of it
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # that use the same license as the "OpenSSL" library), and distribute
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # the linked executables. You must obey the GNU General Public License
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 # in all respects for all of the code used other than "OpenSSL". If you
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 # modify file(s) with this exception, you may extend this exception to
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 # your version of the file(s), but you are not obligated to do so. If
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 # you do not wish to do so, delete this exception statement from your
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 # version. If you delete this exception statement from all source files
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 # in the program, then also delete it here.
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 # This program is distributed in the hope that it will be useful, but
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 # WITHOUT ANY WARRANTY; without even the implied warranty of
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 # General Public License for more details.
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 #
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 # You should have received a copy of the GNU General Public License
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 # along with this program. If not, see <http://www.gnu.org/licenses/>.
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 ## Check whether the parent script sets the mandatory variables
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 if (NOT DEFINED ORTHANC_FRAMEWORK_SOURCE OR
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
38 (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system" AND
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
39 NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" AND
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "web" AND
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" AND
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "path"))
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
43 message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_SOURCE must be set to \"system\", \"hg\", \"web\", \"archive\" or \"path\"")
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ## Detection of the requested version
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" OR
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
52 ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" OR
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 ORTHANC_FRAMEWORK_SOURCE STREQUAL "web")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 if (NOT DEFINED ORTHANC_FRAMEWORK_VERSION)
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_VERSION must be set")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 if (DEFINED ORTHANC_FRAMEWORK_MAJOR OR
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 DEFINED ORTHANC_FRAMEWORK_MINOR OR
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
60 DEFINED ORTHANC_FRAMEWORK_REVISION OR
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
61 DEFINED ORTHANC_FRAMEWORK_MD5)
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 message(FATAL_ERROR "Some internal variable has been set")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
65 set(ORTHANC_FRAMEWORK_MD5 "")
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
66
2688
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
67 if (NOT DEFINED ORTHANC_FRAMEWORK_BRANCH)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
68 if (ORTHANC_FRAMEWORK_VERSION STREQUAL "mainline")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
69 set(ORTHANC_FRAMEWORK_BRANCH "default")
3407
b7728227a852 C++ wrappers: compatibility mode if missing OrthancPluginRegisterMultipartRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3318
diff changeset
70 set(ORTHANC_FRAMEWORK_MAJOR 999)
b7728227a852 C++ wrappers: compatibility mode if missing OrthancPluginRegisterMultipartRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3318
diff changeset
71 set(ORTHANC_FRAMEWORK_MINOR 999)
b7728227a852 C++ wrappers: compatibility mode if missing OrthancPluginRegisterMultipartRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3318
diff changeset
72 set(ORTHANC_FRAMEWORK_REVISION 999)
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73
2688
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
74 else()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
75 set(ORTHANC_FRAMEWORK_BRANCH "Orthanc-${ORTHANC_FRAMEWORK_VERSION}")
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
2688
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
77 set(RE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
78 string(REGEX REPLACE ${RE} "\\1" ORTHANC_FRAMEWORK_MAJOR ${ORTHANC_FRAMEWORK_VERSION})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
79 string(REGEX REPLACE ${RE} "\\2" ORTHANC_FRAMEWORK_MINOR ${ORTHANC_FRAMEWORK_VERSION})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
80 string(REGEX REPLACE ${RE} "\\3" ORTHANC_FRAMEWORK_REVISION ${ORTHANC_FRAMEWORK_VERSION})
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
2688
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
82 if (NOT ORTHANC_FRAMEWORK_MAJOR MATCHES "^[0-9]+$" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
83 NOT ORTHANC_FRAMEWORK_MINOR MATCHES "^[0-9]+$" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
84 NOT ORTHANC_FRAMEWORK_REVISION MATCHES "^[0-9]+$")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
85 message("Bad version of the Orthanc framework: ${ORTHANC_FRAMEWORK_VERSION}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
86 endif()
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
87
2688
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
88 if (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.3.1")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
89 set(ORTHANC_FRAMEWORK_MD5 "dac95bd6cf86fb19deaf4e612961f378")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
90 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.3.2")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
91 set(ORTHANC_FRAMEWORK_MD5 "d0ccdf68e855d8224331f13774992750")
2740
e226f3a23f2f framework 1.4.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2688
diff changeset
92 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.4.0")
e226f3a23f2f framework 1.4.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2688
diff changeset
93 set(ORTHANC_FRAMEWORK_MD5 "81e15f34d97ac32bbd7d26e85698835a")
2915
9abcfd97a76b Orthanc framework 1.4.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2838
diff changeset
94 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.4.1")
9abcfd97a76b Orthanc framework 1.4.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2838
diff changeset
95 set(ORTHANC_FRAMEWORK_MD5 "9b6f6114264b17ed421b574cd6476127")
2838
f3a2d109e361 new orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2740
diff changeset
96 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.4.2")
f3a2d109e361 new orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2740
diff changeset
97 set(ORTHANC_FRAMEWORK_MD5 "d1ee84927dcf668e60eb5868d24b9394")
2993
01dc71f9b9e3 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2915
diff changeset
98 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.0")
01dc71f9b9e3 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2915
diff changeset
99 set(ORTHANC_FRAMEWORK_MD5 "4429d8d9dea4ff6648df80ec3c64d79e")
3044
1000178f94e4 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2993
diff changeset
100 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.1")
1000178f94e4 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2993
diff changeset
101 set(ORTHANC_FRAMEWORK_MD5 "099671538865e5da96208b37494d6718")
3152
6150748578f6 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3135
diff changeset
102 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.2")
6150748578f6 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3135
diff changeset
103 set(ORTHANC_FRAMEWORK_MD5 "8867050f3e9a1ce6157c1ea7a9433b1b")
3170
04336d6da2c6 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3152
diff changeset
104 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.3")
04336d6da2c6 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3152
diff changeset
105 set(ORTHANC_FRAMEWORK_MD5 "bf2f5ed1adb8b0fc5f10d278e68e1dfe")
3213
abb204aed6bf back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3170
diff changeset
106 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.4")
abb204aed6bf back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3170
diff changeset
107 set(ORTHANC_FRAMEWORK_MD5 "404baef5d4c43e7c5d9410edda8ef5a5")
3307
66745b9039aa back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3213
diff changeset
108 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.5")
66745b9039aa back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3213
diff changeset
109 set(ORTHANC_FRAMEWORK_MD5 "cfc437e0687ae4bd725fd93dc1f08bc4")
3318
b770435a93d3 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3307
diff changeset
110 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.6")
b770435a93d3 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3307
diff changeset
111 set(ORTHANC_FRAMEWORK_MD5 "3c29de1e289b5472342947168f0105c0")
3450
bab2a84a6697 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3407
diff changeset
112 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.7")
bab2a84a6697 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3407
diff changeset
113 set(ORTHANC_FRAMEWORK_MD5 "e1b76f01116d9b5d4ac8cc39980560e3")
3542
25126912aa2c back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3450
diff changeset
114 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.8")
25126912aa2c back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3450
diff changeset
115 set(ORTHANC_FRAMEWORK_MD5 "82323e8c49a667f658a3639ea4dbc336")
3780
df69a5fdc836 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3717
diff changeset
116 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.6.0")
df69a5fdc836 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3717
diff changeset
117 set(ORTHANC_FRAMEWORK_MD5 "eab428d6e53f61e847fa360bb17ebe25")
3856
dd0fcbf6a791 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3853
diff changeset
118 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.6.1")
dd0fcbf6a791 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3853
diff changeset
119 set(ORTHANC_FRAMEWORK_MD5 "3971f5de96ba71dc9d3f3690afeaa7c0")
3969
170667f08642 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3856
diff changeset
120 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.0")
170667f08642 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3856
diff changeset
121 set(ORTHANC_FRAMEWORK_MD5 "ce5f689e852b01d3672bd3d2f952a5ef")
3983
7cd0fe733822 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3969
diff changeset
122 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.1")
7cd0fe733822 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3969
diff changeset
123 set(ORTHANC_FRAMEWORK_MD5 "3c171217f930abe80246997bdbcaf7cc")
3717
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
124
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
125 # Below this point are development snapshots that were used to
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
126 # release some plugin, before an official release of the Orthanc
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
127 # framework was available. Here is the command to be used to
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
128 # generate a proper archive:
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
129 #
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
130 # $ hg archive /tmp/Orthanc-`hg id -i | sed 's/\+//'`.tar.gz
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
131 #
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
132 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "ae0e3fd609df")
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
133 # DICOMweb 1.1 (framework pre-1.6.0)
914f783ef085 development snapshot of the Orthanc framework for DICOMweb 1.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
134 set(ORTHANC_FRAMEWORK_MD5 "7e09e9b530a2f527854f0b782d7e0645")
2688
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2553
diff changeset
135 endif()
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
136 endif()
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 endif()
4042
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
138
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
139 elseif (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
3407
b7728227a852 C++ wrappers: compatibility mode if missing OrthancPluginRegisterMultipartRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3318
diff changeset
140 message("Using the Orthanc framework from a path of the filesystem. Assuming mainline version.")
b7728227a852 C++ wrappers: compatibility mode if missing OrthancPluginRegisterMultipartRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3318
diff changeset
141 set(ORTHANC_FRAMEWORK_MAJOR 999)
b7728227a852 C++ wrappers: compatibility mode if missing OrthancPluginRegisterMultipartRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3318
diff changeset
142 set(ORTHANC_FRAMEWORK_MINOR 999)
b7728227a852 C++ wrappers: compatibility mode if missing OrthancPluginRegisterMultipartRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3318
diff changeset
143 set(ORTHANC_FRAMEWORK_REVISION 999)
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 ## Detection of the third-party software
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 find_program(ORTHANC_FRAMEWORK_HG hg)
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 if (${ORTHANC_FRAMEWORK_HG} MATCHES "ORTHANC_FRAMEWORK_HG-NOTFOUND")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 message(FATAL_ERROR "Please install Mercurial")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" OR
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 ORTHANC_FRAMEWORK_SOURCE STREQUAL "web")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 find_program(ORTHANC_FRAMEWORK_7ZIP 7z
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 PATHS
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 "$ENV{ProgramFiles}/7-Zip"
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 "$ENV{ProgramW6432}/7-Zip"
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 )
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 if (${ORTHANC_FRAMEWORK_7ZIP} MATCHES "ORTHANC_FRAMEWORK_7ZIP-NOTFOUND")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 message(FATAL_ERROR "Please install the '7-zip' software (http://www.7-zip.org/)")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 else()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 find_program(ORTHANC_FRAMEWORK_TAR tar)
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 if (${ORTHANC_FRAMEWORK_TAR} MATCHES "ORTHANC_FRAMEWORK_TAR-NOTFOUND")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 message(FATAL_ERROR "Please install the 'tar' package")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 ## Case of the Orthanc framework specified as a path on the filesystem
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "path")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 if (NOT DEFINED ORTHANC_FRAMEWORK_ROOT)
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_ROOT must provide the path to the sources of Orthanc")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT})
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 message(FATAL_ERROR "Non-existing directory: ${ORTHANC_FRAMEWORK_ROOT}")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
198 message(FATAL_ERROR "Directory not containing the source code of Orthanc: ${ORTHANC_FRAMEWORK_ROOT}")
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 set(ORTHANC_ROOT ${ORTHANC_FRAMEWORK_ROOT})
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 ## Case of the Orthanc framework cloned using Mercurial
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg")
2534
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
211 if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
212 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
213 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
214
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 set(ORTHANC_ROOT ${CMAKE_BINARY_DIR}/orthanc)
2534
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
216
2537
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
217 if (EXISTS ${ORTHANC_ROOT})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
218 message("Updating the Orthanc source repository using Mercurial")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
219 execute_process(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
220 COMMAND ${ORTHANC_FRAMEWORK_HG} pull
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
221 WORKING_DIRECTORY ${ORTHANC_ROOT}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
222 RESULT_VARIABLE Failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
223 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
224 else()
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 message("Forking the Orthanc source repository using Mercurial")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 execute_process(
3853
ba53d51ffa9a leaving bitbucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3780
diff changeset
227 COMMAND ${ORTHANC_FRAMEWORK_HG} clone "https://hg.orthanc-server.com/orthanc/"
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 RESULT_VARIABLE Failure
2537
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
230 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
231 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
232
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
233 if (Failure OR NOT EXISTS ${ORTHANC_ROOT})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2534
diff changeset
234 message(FATAL_ERROR "Cannot fork the Orthanc repository")
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 message("Setting branch of the Orthanc repository to: ${ORTHANC_FRAMEWORK_BRANCH}")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 execute_process(
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 COMMAND ${ORTHANC_FRAMEWORK_HG} update -c ${ORTHANC_FRAMEWORK_BRANCH}
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 WORKING_DIRECTORY ${ORTHANC_ROOT}
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 RESULT_VARIABLE Failure
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 )
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 if (Failure)
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246 message(FATAL_ERROR "Error while running Mercurial")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 ## Case of the Orthanc framework provided as a source archive on the
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 ## filesystem
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 if (NOT DEFINED ORTHANC_FRAMEWORK_ARCHIVE)
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_ARCHIVE must provide the path to the sources of Orthanc")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 ##
2547
8b6b0b6ece6b MinGW, ORTHANC_FRAMEWORK_URL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2537
diff changeset
266 ## Case of the Orthanc framework downloaded from the Web
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "web")
2547
8b6b0b6ece6b MinGW, ORTHANC_FRAMEWORK_URL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2537
diff changeset
270 if (DEFINED ORTHANC_FRAMEWORK_URL)
8b6b0b6ece6b MinGW, ORTHANC_FRAMEWORK_URL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2537
diff changeset
271 string(REGEX REPLACE "^.*/" "" ORTHANC_FRAMEMORK_FILENAME "${ORTHANC_FRAMEWORK_URL}")
8b6b0b6ece6b MinGW, ORTHANC_FRAMEWORK_URL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2537
diff changeset
272 else()
8b6b0b6ece6b MinGW, ORTHANC_FRAMEWORK_URL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2537
diff changeset
273 # Default case: Download from the official Web site
8b6b0b6ece6b MinGW, ORTHANC_FRAMEWORK_URL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2537
diff changeset
274 set(ORTHANC_FRAMEMORK_FILENAME Orthanc-${ORTHANC_FRAMEWORK_VERSION}.tar.gz)
3135
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
275 set(ORTHANC_FRAMEWORK_URL "http://orthanc.osimis.io/ThirdPartyDownloads/orthanc-framework/${ORTHANC_FRAMEMORK_FILENAME}")
2547
8b6b0b6ece6b MinGW, ORTHANC_FRAMEWORK_URL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2537
diff changeset
276 endif()
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 set(ORTHANC_FRAMEWORK_ARCHIVE "${CMAKE_SOURCE_DIR}/ThirdPartyDownloads/${ORTHANC_FRAMEMORK_FILENAME}")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280 if (NOT EXISTS "${ORTHANC_FRAMEWORK_ARCHIVE}")
2534
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
281 if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
282 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
283 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2533
diff changeset
284
2547
8b6b0b6ece6b MinGW, ORTHANC_FRAMEWORK_URL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2537
diff changeset
285 message("Downloading: ${ORTHANC_FRAMEWORK_URL}")
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287 file(DOWNLOAD
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
288 "${ORTHANC_FRAMEWORK_URL}" "${ORTHANC_FRAMEWORK_ARCHIVE}"
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
289 SHOW_PROGRESS EXPECTED_MD5 "${ORTHANC_FRAMEWORK_MD5}"
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
290 TIMEOUT 60
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 INACTIVITY_TIMEOUT 60
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
292 )
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
293 else()
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
294 message("Using local copy of: ${ORTHANC_FRAMEWORK_URL}")
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
295 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
297
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302 ## Uncompressing the Orthanc framework, if it was retrieved from a
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
303 ## source archive on the filesystem, or from the official Web site
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 ##
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" OR
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307 ORTHANC_FRAMEWORK_SOURCE STREQUAL "web")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309 if (NOT DEFINED ORTHANC_FRAMEWORK_ARCHIVE OR
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
310 NOT DEFINED ORTHANC_FRAMEWORK_VERSION OR
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
311 NOT DEFINED ORTHANC_FRAMEWORK_MD5)
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312 message(FATAL_ERROR "Internal error")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
315 if (ORTHANC_FRAMEWORK_MD5 STREQUAL "")
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
316 message(FATAL_ERROR "Unknown release of Orthanc: ${ORTHANC_FRAMEWORK_VERSION}")
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
317 endif()
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
318
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
319 file(MD5 ${ORTHANC_FRAMEWORK_ARCHIVE} ActualMD5)
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
320
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
321 if (NOT "${ActualMD5}" STREQUAL "${ORTHANC_FRAMEWORK_MD5}")
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
322 message(FATAL_ERROR "The MD5 hash of the Orthanc archive is invalid: ${ORTHANC_FRAMEWORK_ARCHIVE}")
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
323 endif()
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
324
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
325 set(ORTHANC_ROOT "${CMAKE_BINARY_DIR}/Orthanc-${ORTHANC_FRAMEWORK_VERSION}")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
326
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
327 if (NOT IS_DIRECTORY "${ORTHANC_ROOT}")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
328 if (NOT ORTHANC_FRAMEWORK_ARCHIVE MATCHES ".tar.gz$")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
329 message(FATAL_ERROR "Archive should have the \".tar.gz\" extension: ${ORTHANC_FRAMEWORK_ARCHIVE}")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
330 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
331
2533
e7f86a9f0f79 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2532
diff changeset
332 message("Uncompressing: ${ORTHANC_FRAMEWORK_ARCHIVE}")
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
333
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
334 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
335 # How to silently extract files using 7-zip
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
336 # http://superuser.com/questions/331148/7zip-command-line-extract-silently-quietly
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
337
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
338 execute_process(
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
339 COMMAND ${ORTHANC_FRAMEWORK_7ZIP} e -y ${ORTHANC_FRAMEWORK_ARCHIVE}
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
340 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
341 RESULT_VARIABLE Failure
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
342 OUTPUT_QUIET
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
343 )
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
344
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
345 if (Failure)
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
346 message(FATAL_ERROR "Error while running the uncompression tool")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
347 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
348
2553
7853c9a67605 fix for windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2552
diff changeset
349 get_filename_component(TMP_FILENAME "${ORTHANC_FRAMEWORK_ARCHIVE}" NAME)
7853c9a67605 fix for windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2552
diff changeset
350 string(REGEX REPLACE ".gz$" "" TMP_FILENAME2 "${TMP_FILENAME}")
2531
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
352 execute_process(
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
353 COMMAND ${ORTHANC_FRAMEWORK_7ZIP} x -y ${TMP_FILENAME2}
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
354 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
355 RESULT_VARIABLE Failure
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
356 OUTPUT_QUIET
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
357 )
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
358
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
359 else()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
360 execute_process(
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
361 COMMAND sh -c "${ORTHANC_FRAMEWORK_TAR} xfz ${ORTHANC_FRAMEWORK_ARCHIVE}"
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
362 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
363 RESULT_VARIABLE Failure
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
364 )
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
365 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
366
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
367 if (Failure)
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
368 message(FATAL_ERROR "Error while running the uncompression tool")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
369 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
370
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
371 if (NOT IS_DIRECTORY "${ORTHANC_ROOT}")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
372 message(FATAL_ERROR "The Orthanc framework was not uncompressed at the proper location. Check the CMake instructions.")
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
373 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
374 endif()
b7ed112ce56e DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
375 endif()
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
376
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
377
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
378
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
379 ##
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
380 ## Case of the Orthanc framework installed as a shared library in a
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
381 ## GNU/Linux distribution (typically Debian)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
382 ##
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
383
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
384 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
385 set(ORTHANC_FRAMEWORK_LIBDIR "" CACHE PATH "")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
386
4042
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
387 if (CMAKE_SYSTEM_NAME STREQUAL "Windows" AND
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
388 CMAKE_COMPILER_IS_GNUCXX) # MinGW
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
389 set(DYNAMIC_MINGW_STDLIB ON) # Disable static linking against libc (to throw exceptions)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
390 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
391 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
392 endif()
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
393
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
394 include(CheckIncludeFile)
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
395 include(CheckIncludeFileCXX)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
396 include(FindPythonInterp)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
397 include(${CMAKE_CURRENT_LIST_DIR}/Compiler.cmake)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
398 include(${CMAKE_CURRENT_LIST_DIR}/DownloadPackage.cmake)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
399 include(${CMAKE_CURRENT_LIST_DIR}/AutoGeneratedCode.cmake)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
400 set(EMBED_RESOURCES_PYTHON ${CMAKE_CURRENT_LIST_DIR}/EmbedResources.py)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
401
4043
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4042
diff changeset
402 if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4042
diff changeset
403 NOT ORTHANC_FRAMEWORK_STATIC)
4042
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
404 # Look for mandatory dependency JsonCpp (cf. JsonCppConfiguration.cmake)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
405 find_path(JSONCPP_INCLUDE_DIR json/reader.h
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
406 /usr/include/jsoncpp
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
407 /usr/local/include/jsoncpp
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
408 )
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
409
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
410 message("JsonCpp include dir: ${JSONCPP_INCLUDE_DIR}")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
411 include_directories(${JSONCPP_INCLUDE_DIR})
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
412 link_libraries(jsoncpp)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
413
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
414 CHECK_INCLUDE_FILE_CXX(${JSONCPP_INCLUDE_DIR}/json/reader.h HAVE_JSONCPP_H)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
415 if (NOT HAVE_JSONCPP_H)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
416 message(FATAL_ERROR "Please install the libjsoncpp-dev package")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
417 endif()
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
418
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
419 # Look for mandatory dependency Boost (cf. BoostConfiguration.cmake)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
420 include(FindBoost)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
421 find_package(Boost COMPONENTS filesystem thread system date_time regex)
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
422
4042
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
423 if (NOT Boost_FOUND)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
424 message(FATAL_ERROR "Unable to locate Boost on this system")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
425 endif()
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
426
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
427 include_directories(${Boost_INCLUDE_DIRS})
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
428 link_libraries(${Boost_LIBRARIES})
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
429
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
430 # Optional component - Lua
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
431 if (ENABLE_LUA)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
432 include(FindLua)
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
433
4042
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
434 if (NOT LUA_FOUND)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
435 message(FATAL_ERROR "Please install the liblua-dev package")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
436 endif()
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
437
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
438 include_directories(${LUA_INCLUDE_DIR})
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
439 link_libraries(${LUA_LIBRARIES})
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
440 endif()
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
441
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
442 # Optional component - SQLite
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
443 if (ENABLE_SQLITE)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
444 CHECK_INCLUDE_FILE(sqlite3.h HAVE_SQLITE_H)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
445 if (NOT HAVE_SQLITE_H)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
446 message(FATAL_ERROR "Please install the libsqlite3-dev package")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
447 endif()
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
448 link_libraries(sqlite3)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
449 endif()
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
450 endif()
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
451
4042
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
452 # Optional component - Google Test
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
453 if (ENABLE_GOOGLE_TEST)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
454 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
455 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
456 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
457 include(${CMAKE_CURRENT_LIST_DIR}/GoogleTestConfiguration.cmake)
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
458 endif()
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
459
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
460 # Look for Orthanc framework shared library
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
461 include(CheckCXXSymbolExists)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
462
4042
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
463 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
464 set(ORTHANC_FRAMEWORK_INCLUDE_DIR ${ORTHANC_FRAMEWORK_ROOT})
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
465 include_directories(${ORTHANC_FRAMEWORK_ROOT}/..)
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
466 else()
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
467 find_path(ORTHANC_FRAMEWORK_INCLUDE_DIR OrthancFramework.h
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
468 /usr/include/orthanc-framework
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
469 /usr/local/include/orthanc-framework
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
470 ${ORTHANC_FRAMEWORK_ROOT}
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
471 )
f5c86a00cae0 moving DownloadOrthancFramework.cmake to Resources/CMake/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4037
diff changeset
472 endif()
4037
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
473
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
474 message("Orthanc framework include dir: ${ORTHANC_FRAMEWORK_INCLUDE_DIR}")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
475 include_directories(${ORTHANC_FRAMEWORK_INCLUDE_DIR})
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
476
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
477 set(CMAKE_REQUIRED_INCLUDES "${ORTHANC_FRAMEWORK_INCLUDE_DIR}")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
478
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
479 if (NOT "${ORTHANC_FRAMEWORK_LIBDIR}" STREQUAL "")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
480 set(CMAKE_REQUIRED_LIBRARIES "-L${ORTHANC_FRAMEWORK_LIBDIR} -lOrthancFramework")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
481 else()
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
482 set(CMAKE_REQUIRED_LIBRARIES "OrthancFramework")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
483 endif()
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
484
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
485 check_cxx_symbol_exists("Orthanc::InitializeFramework" "OrthancFramework.h" HAVE_ORTHANC_FRAMEWORK)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
486 if(NOT HAVE_ORTHANC_FRAMEWORK)
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
487 message(FATAL_ERROR "Cannot find the Orthanc framework")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
488 endif()
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
489
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
490 if (NOT "${ORTHANC_FRAMEWORK_ROOT}" STREQUAL "")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
491 include_directories(${ORTHANC_FRAMEWORK_ROOT})
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
492 endif()
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
493
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
494 if (NOT "${ORTHANC_FRAMEWORK_LIBDIR}" STREQUAL "")
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
495 link_directories(${ORTHANC_FRAMEWORK_LIBDIR})
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
496 endif()
5e26d004838c adding option "system" to DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3983
diff changeset
497 endif()