Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Samples/WebSkeleton/Framework/Framework.cmake @ 4044:d25f4c0fa160 framework
splitting code into OrthancFramework and OrthancServer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Jun 2020 20:30:34 +0200 |
parents | Plugins/Samples/WebSkeleton/Framework/Framework.cmake@94f4a18a79cc |
children | d9473bd5ed43 |
comparison
equal
deleted
inserted
replaced
4043:6c6239aec462 | 4044:d25f4c0fa160 |
---|---|
1 # Orthanc - A Lightweight, RESTful DICOM Store | |
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
3 # Department, University Hospital of Liege, Belgium | |
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium | |
5 # | |
6 # This program is free software: you can redistribute it and/or | |
7 # modify it under the terms of the GNU General Public License as | |
8 # published by the Free Software Foundation, either version 3 of the | |
9 # License, or (at your option) any later version. | |
10 # | |
11 # This program is distributed in the hope that it will be useful, but | |
12 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 # General Public License for more details. | |
15 # | |
16 # You should have received a copy of the GNU General Public License | |
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | |
19 | |
20 if (STANDALONE_BUILD) | |
21 add_definitions(-DORTHANC_PLUGIN_STANDALONE=1) | |
22 | |
23 set(AUTOGENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/AUTOGENERATED") | |
24 set(AUTOGENERATED_SOURCES "${AUTOGENERATED_DIR}/EmbeddedResources.cpp") | |
25 | |
26 file(MAKE_DIRECTORY ${AUTOGENERATED_DIR}) | |
27 include_directories(${AUTOGENERATED_DIR}) | |
28 | |
29 set(TARGET_BASE "${AUTOGENERATED_DIR}/EmbeddedResources") | |
30 add_custom_command( | |
31 OUTPUT | |
32 "${AUTOGENERATED_DIR}/EmbeddedResources.h" | |
33 "${AUTOGENERATED_DIR}/EmbeddedResources.cpp" | |
34 COMMAND | |
35 python | |
36 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/EmbedResources.py" | |
37 "${AUTOGENERATED_DIR}/EmbeddedResources" | |
38 STATIC_RESOURCES | |
39 ${RESOURCES_ROOT} | |
40 DEPENDS | |
41 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/EmbedResources.py" | |
42 ${STATIC_RESOURCES} | |
43 ) | |
44 | |
45 else() | |
46 add_definitions( | |
47 -DORTHANC_PLUGIN_STANDALONE=0 | |
48 -DORTHANC_PLUGIN_RESOURCES_ROOT="${RESOURCES_ROOT}" | |
49 ) | |
50 endif() | |
51 | |
52 | |
53 list(APPEND AUTOGENERATED_SOURCES | |
54 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/Plugin.cpp" | |
55 ) |