Mercurial > hg > orthanc-stone
annotate OrthancStone/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake @ 1530:3eca4f9c2827
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Aug 2020 14:37:41 +0200 |
parents | 6e3180a1f20f |
children | b91ea9566d16 |
rev | line source |
---|---|
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
1268 | 4 # Copyright (C) 2017-2020 Osimis S.A., Belgium |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 # |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 # This program is free software: you can redistribute it and/or |
1514 | 7 # modify it under the terms of the GNU Lesser General Public License |
8 # as published by the Free Software Foundation, either version 3 of | |
9 # the License, or (at your option) any later version. | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 # |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 # This program is distributed in the hope that it will be useful, but |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 # WITHOUT ANY WARRANTY; without even the implied warranty of |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1514 | 14 # Lesser General Public License for more details. |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 # |
1514 | 16 # You should have received a copy of the GNU Lesser General Public |
17 # License along with this program. If not, see | |
18 # <http://www.gnu.org/licenses/>. | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 ## Check whether the parent script sets the mandatory variables |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 if (NOT DEFINED ORTHANC_FRAMEWORK_SOURCE OR |
1499 | 27 (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system" AND |
28 NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" AND | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "web" AND |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" AND |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "path")) |
1499 | 32 message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_SOURCE must be set to \"system\", \"hg\", \"web\", \"archive\" or \"path\"") |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 ## Detection of the requested version |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 ORTHANC_FRAMEWORK_SOURCE STREQUAL "web") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 if (NOT DEFINED ORTHANC_FRAMEWORK_VERSION) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_VERSION must be set") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 if (DEFINED ORTHANC_FRAMEWORK_MAJOR OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 DEFINED ORTHANC_FRAMEWORK_MINOR OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 DEFINED ORTHANC_FRAMEWORK_REVISION OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 DEFINED ORTHANC_FRAMEWORK_MD5) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 message(FATAL_ERROR "Some internal variable has been set") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 set(ORTHANC_FRAMEWORK_MD5 "") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 |
310 | 56 if (NOT DEFINED ORTHANC_FRAMEWORK_BRANCH) |
57 if (ORTHANC_FRAMEWORK_VERSION STREQUAL "mainline") | |
58 set(ORTHANC_FRAMEWORK_BRANCH "default") | |
1268 | 59 set(ORTHANC_FRAMEWORK_MAJOR 999) |
60 set(ORTHANC_FRAMEWORK_MINOR 999) | |
61 set(ORTHANC_FRAMEWORK_REVISION 999) | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 |
310 | 63 else() |
64 set(ORTHANC_FRAMEWORK_BRANCH "Orthanc-${ORTHANC_FRAMEWORK_VERSION}") | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 |
310 | 66 set(RE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$") |
67 string(REGEX REPLACE ${RE} "\\1" ORTHANC_FRAMEWORK_MAJOR ${ORTHANC_FRAMEWORK_VERSION}) | |
68 string(REGEX REPLACE ${RE} "\\2" ORTHANC_FRAMEWORK_MINOR ${ORTHANC_FRAMEWORK_VERSION}) | |
69 string(REGEX REPLACE ${RE} "\\3" ORTHANC_FRAMEWORK_REVISION ${ORTHANC_FRAMEWORK_VERSION}) | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 |
310 | 71 if (NOT ORTHANC_FRAMEWORK_MAJOR MATCHES "^[0-9]+$" OR |
72 NOT ORTHANC_FRAMEWORK_MINOR MATCHES "^[0-9]+$" OR | |
73 NOT ORTHANC_FRAMEWORK_REVISION MATCHES "^[0-9]+$") | |
74 message("Bad version of the Orthanc framework: ${ORTHANC_FRAMEWORK_VERSION}") | |
75 endif() | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 |
310 | 77 if (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.3.1") |
78 set(ORTHANC_FRAMEWORK_MD5 "dac95bd6cf86fb19deaf4e612961f378") | |
79 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.3.2") | |
80 set(ORTHANC_FRAMEWORK_MD5 "d0ccdf68e855d8224331f13774992750") | |
81 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.4.0") | |
82 set(ORTHANC_FRAMEWORK_MD5 "81e15f34d97ac32bbd7d26e85698835a") | |
369 | 83 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.4.1") |
84 set(ORTHANC_FRAMEWORK_MD5 "9b6f6114264b17ed421b574cd6476127") | |
310 | 85 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.4.2") |
86 set(ORTHANC_FRAMEWORK_MD5 "d1ee84927dcf668e60eb5868d24b9394") | |
439 | 87 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.0") |
88 set(ORTHANC_FRAMEWORK_MD5 "4429d8d9dea4ff6648df80ec3c64d79e") | |
89 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.1") | |
90 set(ORTHANC_FRAMEWORK_MD5 "099671538865e5da96208b37494d6718") | |
569 | 91 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.2") |
92 set(ORTHANC_FRAMEWORK_MD5 "8867050f3e9a1ce6157c1ea7a9433b1b") | |
93 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.3") | |
94 set(ORTHANC_FRAMEWORK_MD5 "bf2f5ed1adb8b0fc5f10d278e68e1dfe") | |
95 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.4") | |
96 set(ORTHANC_FRAMEWORK_MD5 "404baef5d4c43e7c5d9410edda8ef5a5") | |
97 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.5") | |
98 set(ORTHANC_FRAMEWORK_MD5 "cfc437e0687ae4bd725fd93dc1f08bc4") | |
99 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.6") | |
100 set(ORTHANC_FRAMEWORK_MD5 "3c29de1e289b5472342947168f0105c0") | |
1268 | 101 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.7") |
102 set(ORTHANC_FRAMEWORK_MD5 "e1b76f01116d9b5d4ac8cc39980560e3") | |
103 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.8") | |
104 set(ORTHANC_FRAMEWORK_MD5 "82323e8c49a667f658a3639ea4dbc336") | |
1456 | 105 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.6.0") |
106 set(ORTHANC_FRAMEWORK_MD5 "eab428d6e53f61e847fa360bb17ebe25") | |
1499 | 107 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.6.1") |
108 set(ORTHANC_FRAMEWORK_MD5 "3971f5de96ba71dc9d3f3690afeaa7c0") | |
109 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.0") | |
110 set(ORTHANC_FRAMEWORK_MD5 "ce5f689e852b01d3672bd3d2f952a5ef") | |
111 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.1") | |
112 set(ORTHANC_FRAMEWORK_MD5 "3c171217f930abe80246997bdbcaf7cc") | |
1530 | 113 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.2") |
114 set(ORTHANC_FRAMEWORK_MD5 "328f94dcbd78c169655a13f7ad58a2c2") | |
1456 | 115 |
116 # Below this point are development snapshots that were used to | |
117 # release some plugin, before an official release of the Orthanc | |
118 # framework was available. Here is the command to be used to | |
119 # generate a proper archive: | |
120 # | |
121 # $ hg archive /tmp/Orthanc-`hg id -i | sed 's/\+//'`.tar.gz | |
122 # | |
123 elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "ae0e3fd609df") | |
124 # DICOMweb 1.1 (framework pre-1.6.0) | |
125 set(ORTHANC_FRAMEWORK_MD5 "7e09e9b530a2f527854f0b782d7e0645") | |
310 | 126 endif() |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 endif() |
1499 | 129 |
1530 | 130 elseif (ORTHANC_FRAMEWORK_SOURCE STREQUAL "path") |
1268 | 131 message("Using the Orthanc framework from a path of the filesystem. Assuming mainline version.") |
132 set(ORTHANC_FRAMEWORK_MAJOR 999) | |
133 set(ORTHANC_FRAMEWORK_MINOR 999) | |
134 set(ORTHANC_FRAMEWORK_REVISION 999) | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 ## Detection of the third-party software |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 find_program(ORTHANC_FRAMEWORK_HG hg) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 if (${ORTHANC_FRAMEWORK_HG} MATCHES "ORTHANC_FRAMEWORK_HG-NOTFOUND") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 message(FATAL_ERROR "Please install Mercurial") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 ORTHANC_FRAMEWORK_SOURCE STREQUAL "web") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 find_program(ORTHANC_FRAMEWORK_7ZIP 7z |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 PATHS |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 "$ENV{ProgramFiles}/7-Zip" |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 "$ENV{ProgramW6432}/7-Zip" |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 ) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 if (${ORTHANC_FRAMEWORK_7ZIP} MATCHES "ORTHANC_FRAMEWORK_7ZIP-NOTFOUND") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 message(FATAL_ERROR "Please install the '7-zip' software (http://www.7-zip.org/)") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
163 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 else() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
166 find_program(ORTHANC_FRAMEWORK_TAR tar) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
167 if (${ORTHANC_FRAMEWORK_TAR} MATCHES "ORTHANC_FRAMEWORK_TAR-NOTFOUND") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 message(FATAL_ERROR "Please install the 'tar' package") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
169 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 ## Case of the Orthanc framework specified as a path on the filesystem |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
178 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
179 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "path") |
1530 | 180 if (NOT DEFINED ORTHANC_FRAMEWORK_ROOT OR |
181 ORTHANC_FRAMEWORK_ROOT STREQUAL "") | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
182 message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_ROOT must provide the path to the sources of Orthanc") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
183 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 message(FATAL_ERROR "Non-existing directory: ${ORTHANC_FRAMEWORK_ROOT}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
187 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
190 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
192 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
193 ## Case of the Orthanc framework cloned using Mercurial |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
195 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
196 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
198 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
199 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 set(ORTHANC_ROOT ${CMAKE_BINARY_DIR}/orthanc) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
202 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
203 if (EXISTS ${ORTHANC_ROOT}) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
204 message("Updating the Orthanc source repository using Mercurial") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
205 execute_process( |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
206 COMMAND ${ORTHANC_FRAMEWORK_HG} pull |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
207 WORKING_DIRECTORY ${ORTHANC_ROOT} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
208 RESULT_VARIABLE Failure |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
209 ) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 else() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
211 message("Forking the Orthanc source repository using Mercurial") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
212 execute_process( |
1456 | 213 COMMAND ${ORTHANC_FRAMEWORK_HG} clone "https://hg.orthanc-server.com/orthanc/" |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
214 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
215 RESULT_VARIABLE Failure |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
216 ) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
217 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
218 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
219 if (Failure OR NOT EXISTS ${ORTHANC_ROOT}) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
220 message(FATAL_ERROR "Cannot fork the Orthanc repository") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
221 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
222 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
223 message("Setting branch of the Orthanc repository to: ${ORTHANC_FRAMEWORK_BRANCH}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
224 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
225 execute_process( |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
226 COMMAND ${ORTHANC_FRAMEWORK_HG} update -c ${ORTHANC_FRAMEWORK_BRANCH} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
227 WORKING_DIRECTORY ${ORTHANC_ROOT} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
228 RESULT_VARIABLE Failure |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
229 ) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
230 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
231 if (Failure) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
232 message(FATAL_ERROR "Error while running Mercurial") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
233 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
234 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
235 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
236 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
237 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
238 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
239 ## Case of the Orthanc framework provided as a source archive on the |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
240 ## filesystem |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
241 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
242 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
243 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive") |
1530 | 244 if (NOT DEFINED ORTHANC_FRAMEWORK_ARCHIVE OR |
245 ORTHANC_FRAMEWORK_ARCHIVE STREQUAL "") | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
246 message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_ARCHIVE must provide the path to the sources of Orthanc") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
247 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
248 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
249 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
250 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
251 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
252 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
253 ## Case of the Orthanc framework downloaded from the Web |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
254 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
255 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
256 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "web") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
257 if (DEFINED ORTHANC_FRAMEWORK_URL) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
258 string(REGEX REPLACE "^.*/" "" ORTHANC_FRAMEMORK_FILENAME "${ORTHANC_FRAMEWORK_URL}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
259 else() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
260 # Default case: Download from the official Web site |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
261 set(ORTHANC_FRAMEMORK_FILENAME Orthanc-${ORTHANC_FRAMEWORK_VERSION}.tar.gz) |
449
bb658baeb967
moving third-party dependencies to another server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
439
diff
changeset
|
262 set(ORTHANC_FRAMEWORK_URL "http://orthanc.osimis.io/ThirdPartyDownloads/orthanc-framework/${ORTHANC_FRAMEMORK_FILENAME}") |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
263 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
264 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
265 set(ORTHANC_FRAMEWORK_ARCHIVE "${CMAKE_SOURCE_DIR}/ThirdPartyDownloads/${ORTHANC_FRAMEMORK_FILENAME}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
266 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
267 if (NOT EXISTS "${ORTHANC_FRAMEWORK_ARCHIVE}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
268 if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
269 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
270 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
271 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
272 message("Downloading: ${ORTHANC_FRAMEWORK_URL}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
273 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
274 file(DOWNLOAD |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
275 "${ORTHANC_FRAMEWORK_URL}" "${ORTHANC_FRAMEWORK_ARCHIVE}" |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
276 SHOW_PROGRESS EXPECTED_MD5 "${ORTHANC_FRAMEWORK_MD5}" |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
277 TIMEOUT 60 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
278 INACTIVITY_TIMEOUT 60 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
279 ) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
280 else() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
281 message("Using local copy of: ${ORTHANC_FRAMEWORK_URL}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
282 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
283 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
284 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
285 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
286 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
287 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
288 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
289 ## Uncompressing the Orthanc framework, if it was retrieved from a |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
290 ## source archive on the filesystem, or from the official Web site |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
291 ## |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
292 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
293 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
294 ORTHANC_FRAMEWORK_SOURCE STREQUAL "web") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
295 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
296 if (NOT DEFINED ORTHANC_FRAMEWORK_ARCHIVE OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
297 NOT DEFINED ORTHANC_FRAMEWORK_VERSION OR |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
298 NOT DEFINED ORTHANC_FRAMEWORK_MD5) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
299 message(FATAL_ERROR "Internal error") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
300 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
301 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
302 if (ORTHANC_FRAMEWORK_MD5 STREQUAL "") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
303 message(FATAL_ERROR "Unknown release of Orthanc: ${ORTHANC_FRAMEWORK_VERSION}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
304 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
305 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
306 file(MD5 ${ORTHANC_FRAMEWORK_ARCHIVE} ActualMD5) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
307 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
308 if (NOT "${ActualMD5}" STREQUAL "${ORTHANC_FRAMEWORK_MD5}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
309 message(FATAL_ERROR "The MD5 hash of the Orthanc archive is invalid: ${ORTHANC_FRAMEWORK_ARCHIVE}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
310 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
311 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
312 set(ORTHANC_ROOT "${CMAKE_BINARY_DIR}/Orthanc-${ORTHANC_FRAMEWORK_VERSION}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
313 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
314 if (NOT IS_DIRECTORY "${ORTHANC_ROOT}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
315 if (NOT ORTHANC_FRAMEWORK_ARCHIVE MATCHES ".tar.gz$") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
316 message(FATAL_ERROR "Archive should have the \".tar.gz\" extension: ${ORTHANC_FRAMEWORK_ARCHIVE}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
317 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
318 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
319 message("Uncompressing: ${ORTHANC_FRAMEWORK_ARCHIVE}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
320 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
321 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
322 # How to silently extract files using 7-zip |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
323 # http://superuser.com/questions/331148/7zip-command-line-extract-silently-quietly |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
324 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
325 execute_process( |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
326 COMMAND ${ORTHANC_FRAMEWORK_7ZIP} e -y ${ORTHANC_FRAMEWORK_ARCHIVE} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
327 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
328 RESULT_VARIABLE Failure |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
329 OUTPUT_QUIET |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
330 ) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
331 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
332 if (Failure) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
333 message(FATAL_ERROR "Error while running the uncompression tool") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
334 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
335 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
336 get_filename_component(TMP_FILENAME "${ORTHANC_FRAMEWORK_ARCHIVE}" NAME) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
337 string(REGEX REPLACE ".gz$" "" TMP_FILENAME2 "${TMP_FILENAME}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
338 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
339 execute_process( |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
340 COMMAND ${ORTHANC_FRAMEWORK_7ZIP} x -y ${TMP_FILENAME2} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
341 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
342 RESULT_VARIABLE Failure |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
343 OUTPUT_QUIET |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
344 ) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
345 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
346 else() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
347 execute_process( |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
348 COMMAND sh -c "${ORTHANC_FRAMEWORK_TAR} xfz ${ORTHANC_FRAMEWORK_ARCHIVE}" |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
349 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
350 RESULT_VARIABLE Failure |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
351 ) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
352 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
353 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
354 if (Failure) |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
355 message(FATAL_ERROR "Error while running the uncompression tool") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
356 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
357 |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
358 if (NOT IS_DIRECTORY "${ORTHANC_ROOT}") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
359 message(FATAL_ERROR "The Orthanc framework was not uncompressed at the proper location. Check the CMake instructions.") |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
360 endif() |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
361 endif() |
1530 | 362 endif() |
363 | |
364 | |
365 | |
366 ## | |
367 ## Determine the path to the sources of the Orthanc framework | |
368 ## | |
369 | |
370 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" OR | |
371 ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" OR | |
372 ORTHANC_FRAMEWORK_SOURCE STREQUAL "web") | |
373 if (NOT DEFINED ORTHANC_ROOT OR | |
374 NOT DEFINED ORTHANC_FRAMEWORK_MAJOR OR | |
375 NOT DEFINED ORTHANC_FRAMEWORK_MINOR OR | |
376 NOT DEFINED ORTHANC_FRAMEWORK_REVISION) | |
377 message(FATAL_ERROR "Internal error in the DownloadOrthancFramework.cmake file") | |
378 endif() | |
1504 | 379 |
380 unset(ORTHANC_FRAMEWORK_ROOT CACHE) | |
381 | |
1530 | 382 if ("${ORTHANC_FRAMEWORK_MAJOR}.${ORTHANC_FRAMEWORK_MINOR}.${ORTHANC_FRAMEWORK_REVISION}" VERSION_LESS "1.7.2") |
383 set(ORTHANC_FRAMEWORK_ROOT "${ORTHANC_ROOT}/Core" CACHE | |
384 STRING "Path to the Orthanc framework source directory") | |
385 set(ENABLE_PLUGINS_VERSION_SCRIPT OFF) | |
386 else() | |
387 set(ORTHANC_FRAMEWORK_ROOT "${ORTHANC_ROOT}/OrthancFramework/Sources" CACHE | |
388 STRING "Path to the Orthanc framework source directory") | |
1504 | 389 endif() |
390 | |
391 unset(ORTHANC_ROOT) | |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
392 endif() |
1499 | 393 |
1530 | 394 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") |
395 if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/OrthancException.h OR | |
396 NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake) | |
397 message(FATAL_ERROR "Directory not containing the source code of the Orthanc framework: ${ORTHANC_FRAMEWORK_ROOT}") | |
398 endif() | |
399 endif() | |
400 | |
1499 | 401 |
402 | |
403 ## | |
404 ## Case of the Orthanc framework installed as a shared library in a | |
1508
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
405 ## GNU/Linux distribution (typically Debian). New in Orthanc 1.7.2. |
1499 | 406 ## |
407 | |
408 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") | |
409 set(ORTHANC_FRAMEWORK_LIBDIR "" CACHE PATH "") | |
410 | |
411 if (CMAKE_SYSTEM_NAME STREQUAL "Windows" AND | |
412 CMAKE_COMPILER_IS_GNUCXX) # MinGW | |
413 set(DYNAMIC_MINGW_STDLIB ON) # Disable static linking against libc (to throw exceptions) | |
414 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++") | |
415 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++") | |
416 endif() | |
417 | |
418 include(CheckIncludeFile) | |
419 include(CheckIncludeFileCXX) | |
420 include(FindPythonInterp) | |
421 include(${CMAKE_CURRENT_LIST_DIR}/Compiler.cmake) | |
422 include(${CMAKE_CURRENT_LIST_DIR}/DownloadPackage.cmake) | |
423 include(${CMAKE_CURRENT_LIST_DIR}/AutoGeneratedCode.cmake) | |
424 set(EMBED_RESOURCES_PYTHON ${CMAKE_CURRENT_LIST_DIR}/EmbedResources.py) | |
425 | |
1504 | 426 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR |
427 ORTHANC_FRAMEWORK_STATIC) | |
428 include_directories(${ORTHANC_FRAMEWORK_ROOT}/..) | |
429 else() | |
1499 | 430 # Look for mandatory dependency JsonCpp (cf. JsonCppConfiguration.cmake) |
431 find_path(JSONCPP_INCLUDE_DIR json/reader.h | |
432 /usr/include/jsoncpp | |
433 /usr/local/include/jsoncpp | |
434 ) | |
435 | |
436 message("JsonCpp include dir: ${JSONCPP_INCLUDE_DIR}") | |
437 include_directories(${JSONCPP_INCLUDE_DIR}) | |
438 link_libraries(jsoncpp) | |
439 | |
440 CHECK_INCLUDE_FILE_CXX(${JSONCPP_INCLUDE_DIR}/json/reader.h HAVE_JSONCPP_H) | |
441 if (NOT HAVE_JSONCPP_H) | |
442 message(FATAL_ERROR "Please install the libjsoncpp-dev package") | |
443 endif() | |
444 | |
1530 | 445 # Switch to the C++11 standard if the version of JsonCpp is 1.y.z |
446 # (same as variable JSONCPP_CXX11 in the source code of Orthanc) | |
447 if (EXISTS ${JSONCPP_INCLUDE_DIR}/json/version.h) | |
448 file(STRINGS | |
449 "${JSONCPP_INCLUDE_DIR}/json/version.h" | |
450 JSONCPP_VERSION_MAJOR1 REGEX | |
451 ".*define JSONCPP_VERSION_MAJOR.*") | |
452 | |
453 if (NOT JSONCPP_VERSION_MAJOR1) | |
454 message(FATAL_ERROR "Unable to extract the major version of JsonCpp") | |
455 endif() | |
456 | |
457 string(REGEX REPLACE | |
458 ".*JSONCPP_VERSION_MAJOR.*([0-9]+)$" "\\1" | |
459 JSONCPP_VERSION_MAJOR ${JSONCPP_VERSION_MAJOR1}) | |
460 message("JsonCpp major version: ${JSONCPP_VERSION_MAJOR}") | |
461 | |
462 if (JSONCPP_VERSION_MAJOR GREATER 0) | |
463 message("Switching to C++11 standard, as version of JsonCpp is >= 1.0.0") | |
464 if (CMAKE_COMPILER_IS_GNUCXX) | |
465 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") | |
466 elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") | |
467 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
468 endif() | |
469 endif() | |
470 else() | |
471 message("Unable to detect the major version of JsonCpp, assuming < 1.0.0") | |
472 endif() | |
473 | |
1499 | 474 # Look for mandatory dependency Boost (cf. BoostConfiguration.cmake) |
475 include(FindBoost) | |
1508
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
476 find_package(Boost COMPONENTS filesystem thread system date_time regex ${ORTHANC_BOOST_COMPONENTS}) |
1499 | 477 |
478 if (NOT Boost_FOUND) | |
479 message(FATAL_ERROR "Unable to locate Boost on this system") | |
480 endif() | |
481 | |
482 include_directories(${Boost_INCLUDE_DIRS}) | |
483 link_libraries(${Boost_LIBRARIES}) | |
484 | |
485 # Optional component - Lua | |
486 if (ENABLE_LUA) | |
487 include(FindLua) | |
488 | |
489 if (NOT LUA_FOUND) | |
490 message(FATAL_ERROR "Please install the liblua-dev package") | |
491 endif() | |
492 | |
493 include_directories(${LUA_INCLUDE_DIR}) | |
494 link_libraries(${LUA_LIBRARIES}) | |
495 endif() | |
496 | |
497 # Optional component - SQLite | |
498 if (ENABLE_SQLITE) | |
499 CHECK_INCLUDE_FILE(sqlite3.h HAVE_SQLITE_H) | |
500 if (NOT HAVE_SQLITE_H) | |
501 message(FATAL_ERROR "Please install the libsqlite3-dev package") | |
502 endif() | |
503 link_libraries(sqlite3) | |
504 endif() | |
1504 | 505 |
506 # Optional component - Pugixml | |
507 if (ENABLE_PUGIXML) | |
508 CHECK_INCLUDE_FILE_CXX(pugixml.hpp HAVE_PUGIXML_H) | |
509 if (NOT HAVE_PUGIXML_H) | |
510 message(FATAL_ERROR "Please install the libpugixml-dev package") | |
511 endif() | |
512 link_libraries(pugixml) | |
513 endif() | |
514 | |
515 # Optional component - DCMTK | |
516 if (ENABLE_DCMTK) | |
517 include(FindDCMTK) | |
518 include_directories(${DCMTK_INCLUDE_DIRS}) | |
519 link_libraries(${DCMTK_LIBRARIES}) | |
520 endif() | |
1499 | 521 endif() |
522 | |
523 # Look for Orthanc framework shared library | |
524 include(CheckCXXSymbolExists) | |
525 | |
526 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") | |
527 set(ORTHANC_FRAMEWORK_INCLUDE_DIR ${ORTHANC_FRAMEWORK_ROOT}) | |
528 else() | |
529 find_path(ORTHANC_FRAMEWORK_INCLUDE_DIR OrthancFramework.h | |
530 /usr/include/orthanc-framework | |
531 /usr/local/include/orthanc-framework | |
532 ${ORTHANC_FRAMEWORK_ROOT} | |
533 ) | |
534 endif() | |
1508
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
535 |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
536 if (${ORTHANC_FRAMEWORK_INCLUDE_DIR} STREQUAL "ORTHANC_FRAMEWORK_INCLUDE_DIR-NOTFOUND") |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
537 message(FATAL_ERROR "Cannot locate the OrthancFramework.h header") |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
538 endif() |
1499 | 539 |
540 message("Orthanc framework include dir: ${ORTHANC_FRAMEWORK_INCLUDE_DIR}") | |
541 include_directories(${ORTHANC_FRAMEWORK_INCLUDE_DIR}) | |
542 | |
1508
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
543 if ("${ORTHANC_FRAMEWORK_LIBDIR}" STREQUAL "") |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
544 set(ORTHANC_FRAMEWORK_LIBRARIES OrthancFramework) |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
545 else() |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
546 if (MSVC) |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
547 set(Suffix ".lib") |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
548 set(Prefix "") |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
549 else() |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
550 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
551 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
552 endif() |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
553 set(ORTHANC_FRAMEWORK_LIBRARIES ${ORTHANC_FRAMEWORK_LIBDIR}/${Prefix}OrthancFramework${Suffix}) |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
554 endif() |
1499 | 555 |
1508
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
556 set(CMAKE_REQUIRED_INCLUDES "${ORTHANC_FRAMEWORK_INCLUDE_DIR}") |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
557 set(CMAKE_REQUIRED_LIBRARIES "${ORTHANC_FRAMEWORK_LIBRARIES}") |
1499 | 558 |
559 check_cxx_symbol_exists("Orthanc::InitializeFramework" "OrthancFramework.h" HAVE_ORTHANC_FRAMEWORK) | |
1508
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
560 if (NOT HAVE_ORTHANC_FRAMEWORK) |
1499 | 561 message(FATAL_ERROR "Cannot find the Orthanc framework") |
562 endif() | |
563 | |
1508
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
564 unset(CMAKE_REQUIRED_INCLUDES) |
dd1d1cc0575d
use of OrthancPluginsExports.cmake, link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1504
diff
changeset
|
565 unset(CMAKE_REQUIRED_LIBRARIES) |
1499 | 566 endif() |