annotate Plugins/Samples/WebSkeleton/Framework/Framework.cmake @ 1949:d90f737f2dde

warn about the use of privileged ports
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 Apr 2016 10:30:17 +0200
parents b1291df2f780
children a3a65de1840f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1390
diff changeset
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
1181
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 #
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 # 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
6 # 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
7 # 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
8 # 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
9 #
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # 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
11 # 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
12 # 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
13 # General Public License for more details.
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 #
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # 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
16 # 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
17
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 if (STANDALONE_BUILD)
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 add_definitions(-DORTHANC_PLUGIN_STANDALONE=1)
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 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
23 set(AUTOGENERATED_SOURCES "${AUTOGENERATED_DIR}/EmbeddedResources.cpp")
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 file(MAKE_DIRECTORY ${AUTOGENERATED_DIR})
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 include_directories(${AUTOGENERATED_DIR})
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 set(TARGET_BASE "${AUTOGENERATED_DIR}/EmbeddedResources")
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 add_custom_command(
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 OUTPUT
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 "${AUTOGENERATED_DIR}/EmbeddedResources.h"
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 "${AUTOGENERATED_DIR}/EmbeddedResources.cpp"
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 COMMAND
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 python
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/EmbedResources.py"
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 "${AUTOGENERATED_DIR}/EmbeddedResources"
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 STATIC_RESOURCES
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 ${RESOURCES_ROOT}
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 DEPENDS
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/EmbedResources.py"
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 ${STATIC_RESOURCES}
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 )
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 else()
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 add_definitions(
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 -DORTHANC_PLUGIN_STANDALONE=0
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 -DORTHANC_PLUGIN_RESOURCES_ROOT="${RESOURCES_ROOT}"
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 )
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 endif()
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
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 list(APPEND AUTOGENERATED_SOURCES
17302d83abfd Sample plugin framework to serve static resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 "${CMAKE_CURRENT_SOURCE_DIR}/Framework/Plugin.cpp"
1390
92da9e1c2daa improvement of samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1375
diff changeset
54 )