comparison OrthancStone/Resources/CMake/OrthancStoneParameters.cmake @ 1512:244ad1e4e76a

reorganization of folders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 Jul 2020 16:21:02 +0200
parents Resources/CMake/OrthancStoneParameters.cmake@1005c1cbe4dd
children 3eca4f9c2827
comparison
equal deleted inserted replaced
1511:9dfeee74c1e6 1512:244ad1e4e76a
1 # Stone of Orthanc
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 Affero 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.
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 # Affero General Public License for more details.
15 #
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19
20
21 #####################################################################
22 ## Select the location of the Orthanc framework
23 #####################################################################
24
25 set(ORTHANC_STONE_ROOT ${CMAKE_CURRENT_LIST_DIR}/../..)
26
27 include(${CMAKE_CURRENT_LIST_DIR}/Version.cmake)
28
29 if (ORTHANC_STONE_VERSION STREQUAL "mainline")
30 set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline")
31 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
32 else()
33 set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.7.2")
34 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
35 endif()
36
37 # Parameters of the build
38 set(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
39 set(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
40 set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc framework (can be \"system\", \"hg\", \"archive\", \"web\" or \"path\")")
41 set(ORTHANC_FRAMEWORK_VERSION "${ORTHANC_FRAMEWORK_DEFAULT_VERSION}" CACHE STRING "Version of the Orthanc framework")
42 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
43 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")
44
45 # Advanced parameters to fine-tune linking against system libraries
46 set(ORTHANC_FRAMEWORK_STATIC OFF CACHE BOOL "If linking against the Orthanc framework system library, indicates whether this library was statically linked")
47 mark_as_advanced(ORTHANC_FRAMEWORK_STATIC)
48
49
50
51 #####################################################################
52 ## Import the parameters of the Orthanc Framework
53 #####################################################################
54
55 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
56 include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/DownloadOrthancFramework.cmake)
57 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)
58
59 unset(STANDALONE_BUILD CACHE)
60 set(STANDALONE_BUILD ON) # Embed DCMTK's dictionaries in static builds
61
62 set(ENABLE_DCMTK OFF)
63 set(ENABLE_GOOGLE_TEST ON)
64 set(ENABLE_JPEG ON)
65 set(ENABLE_OPENSSL_ENGINES ON)
66 set(ENABLE_PNG ON)
67 set(ENABLE_SQLITE OFF)
68 set(ENABLE_ZLIB ON)
69 endif()
70
71
72
73 #####################################################################
74 ## CMake parameters tunable by the user
75 #####################################################################
76
77 # Advanced parameters to fine-tune linking against system libraries
78 set(USE_SYSTEM_CAIRO ON CACHE BOOL "Use the system version of Cairo")
79 set(USE_SYSTEM_FREETYPE ON CACHE BOOL "Use the system version of Freetype")
80 set(USE_SYSTEM_GLEW ON CACHE BOOL "Use the system version of glew (for Windows only)")
81 set(USE_SYSTEM_PIXMAN ON CACHE BOOL "Use the system version of Pixman")
82 set(USE_SYSTEM_SDL ON CACHE BOOL "Use the system version of SDL2")
83
84
85
86 #####################################################################
87 ## Internal CMake parameters to enable the optional subcomponents of
88 ## the Stone of Orthanc
89 #####################################################################
90
91 set(ENABLE_OPENGL ON CACHE BOOL "Enable support of OpenGL")
92 set(ENABLE_WASM OFF CACHE INTERNAL "Enable support of WebAssembly")
93 set(ENABLE_GUIADAPTER OFF CACHE INTERNAL "Enable backward compatibility with the Stone GuiAdapter class")