annotate OrthancStone/Resources/CMake/OrthancStoneParameters.cmake @ 1515:b750b6eab453

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 Jul 2020 20:52:35 +0200
parents 244ad1e4e76a
children 3eca4f9c2827
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
115
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # Stone of Orthanc
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Department, University Hospital of Liege, Belgium
1270
2d8ab34c8c91 upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 740
diff changeset
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium
115
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 #
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 # This program is free software: you can redistribute it and/or
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 # modify it under the terms of the GNU Affero General Public License
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # the License, or (at your option) any later version.
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 #
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # This program is distributed in the hope that it will be useful, but
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # Affero General Public License for more details.
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 #
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 # You should have received a copy of the GNU Affero General Public License
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 #####################################################################
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
22 ## Select the location of the Orthanc framework
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
23 #####################################################################
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
24
1512
244ad1e4e76a reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1510
diff changeset
25 set(ORTHANC_STONE_ROOT ${CMAKE_CURRENT_LIST_DIR}/../..)
244ad1e4e76a reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1510
diff changeset
26
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
27 include(${CMAKE_CURRENT_LIST_DIR}/Version.cmake)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
28
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
29 if (ORTHANC_STONE_VERSION STREQUAL "mainline")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
30 set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
31 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
32 else()
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
33 set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.7.2")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
34 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
35 endif()
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
36
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
37 # Parameters of the build
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
38 set(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
39 set(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
40 set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc framework (can be \"system\", \"hg\", \"archive\", \"web\" or \"path\")")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
41 set(ORTHANC_FRAMEWORK_VERSION "${ORTHANC_FRAMEWORK_DEFAULT_VERSION}" CACHE STRING "Version of the Orthanc framework")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
42 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
43 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
44
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
45 # Advanced parameters to fine-tune linking against system libraries
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
46 set(ORTHANC_FRAMEWORK_STATIC OFF CACHE BOOL "If linking against the Orthanc framework system library, indicates whether this library was statically linked")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
47 mark_as_advanced(ORTHANC_FRAMEWORK_STATIC)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
48
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
49
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
50
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
51 #####################################################################
115
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 ## Import the parameters of the Orthanc Framework
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 #####################################################################
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
55 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
56 include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/DownloadOrthancFramework.cmake)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
57 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
58
1510
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
59 unset(STANDALONE_BUILD CACHE)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
60 set(STANDALONE_BUILD ON) # Embed DCMTK's dictionaries in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1509
diff changeset
61
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
62 set(ENABLE_DCMTK OFF)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
63 set(ENABLE_GOOGLE_TEST ON)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
64 set(ENABLE_JPEG ON)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
65 set(ENABLE_OPENSSL_ENGINES ON)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
66 set(ENABLE_PNG ON)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
67 set(ENABLE_SQLITE OFF)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
68 set(ENABLE_ZLIB ON)
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
69 endif()
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
70
115
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 #####################################################################
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 ## CMake parameters tunable by the user
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 #####################################################################
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 # Advanced parameters to fine-tune linking against system libraries
200
03afbee0cc7b integration of Orthanc core into Stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
78 set(USE_SYSTEM_CAIRO ON CACHE BOOL "Use the system version of Cairo")
576
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 573
diff changeset
79 set(USE_SYSTEM_FREETYPE ON CACHE BOOL "Use the system version of Freetype")
613
412a2d01a189 automatic initialization of glew
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
80 set(USE_SYSTEM_GLEW ON CACHE BOOL "Use the system version of glew (for Windows only)")
200
03afbee0cc7b integration of Orthanc core into Stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
81 set(USE_SYSTEM_PIXMAN ON CACHE BOOL "Use the system version of Pixman")
03afbee0cc7b integration of Orthanc core into Stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
82 set(USE_SYSTEM_SDL ON CACHE BOOL "Use the system version of SDL2")
115
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
1509
b7210c688ca7 linking SDL samples against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1508
diff changeset
85
115
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 #####################################################################
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 ## Internal CMake parameters to enable the optional subcomponents of
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 ## the Stone of Orthanc
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 #####################################################################
f598ffb81cda fix sandboxed build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
1298
8a0a62189f46 replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1270
diff changeset
91 set(ENABLE_OPENGL ON CACHE BOOL "Enable support of OpenGL")
616
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 613
diff changeset
92 set(ENABLE_WASM OFF CACHE INTERNAL "Enable support of WebAssembly")
1410
b2b0fc4a5596 Added ENABLE_GUIADAPTER option + fixed include paths in GuiAdapter
Benjamin Golinvaux <bgo@osimis.io>
parents: 1298
diff changeset
93 set(ENABLE_GUIADAPTER OFF CACHE INTERNAL "Enable backward compatibility with the Stone GuiAdapter class")