Mercurial > hg > orthanc
annotate Plugins/Samples/WebSkeleton/Framework/Framework.cmake @ 2883:ad80db5539af Orthanc-1.4.0
closing branch
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Oct 2018 15:17:32 +0200 |
parents | 878b59270859 |
children | 4e43e67f8ecf |
rev | line source |
---|---|
1181
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
1900 | 2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1181
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
2447
878b59270859
upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
4 # Copyright (C) 2017-2018 Osimis S.A., Belgium |
1181
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 # |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 # This program is free software: you can redistribute it and/or |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 # modify it under the terms of the GNU General Public License as |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 # published by the Free Software Foundation, either version 3 of the |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 # License, or (at your option) any later version. |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 # |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 # This program is distributed in the hope that it will be useful, but |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 # WITHOUT ANY WARRANTY; without even the implied warranty of |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 # General Public License for more details. |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 # |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 # You should have received a copy of the GNU General Public License |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 if (STANDALONE_BUILD) |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 add_definitions(-DORTHANC_PLUGIN_STANDALONE=1) |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 set(AUTOGENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/AUTOGENERATED") |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 set(AUTOGENERATED_SOURCES "${AUTOGENERATED_DIR}/EmbeddedResources.cpp") |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 file(MAKE_DIRECTORY ${AUTOGENERATED_DIR}) |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 include_directories(${AUTOGENERATED_DIR}) |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 set(TARGET_BASE "${AUTOGENERATED_DIR}/EmbeddedResources") |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 add_custom_command( |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 OUTPUT |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 "${AUTOGENERATED_DIR}/EmbeddedResources.h" |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 "${AUTOGENERATED_DIR}/EmbeddedResources.cpp" |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 COMMAND |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 python |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/EmbedResources.py" |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 "${AUTOGENERATED_DIR}/EmbeddedResources" |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 STATIC_RESOURCES |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 ${RESOURCES_ROOT} |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 DEPENDS |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/EmbedResources.py" |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 ${STATIC_RESOURCES} |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 ) |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 else() |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 add_definitions( |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 -DORTHANC_PLUGIN_STANDALONE=0 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 -DORTHANC_PLUGIN_RESOURCES_ROOT="${RESOURCES_ROOT}" |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 ) |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 endif() |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 list(APPEND AUTOGENERATED_SOURCES |
17302d83abfd
Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/Plugin.cpp" |
1390
92da9e1c2daa
improvement of samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1375
diff
changeset
|
55 ) |