Mercurial > hg > orthanc-databases
annotate Resources/CMake/DatabasesFrameworkConfiguration.cmake @ 66:e78d7077ee1c db-changes
preparing for db-changes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Dec 2018 17:19:17 +0100 |
parents | b3de8c09c8b0 |
children | 714c5d2bee76 |
rev | line source |
---|---|
0 | 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-2018 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 ## Enable the Orthanc subcomponents depending on the configuration | |
23 ##################################################################### | |
24 | |
25 if (ENABLE_SQLITE_BACKEND) | |
26 set(ENABLE_SQLITE ON) | |
27 endif() | |
28 | |
29 if (ENABLE_POSTGRESQL_BACKEND) | |
30 set(ENABLE_SSL ON) | |
31 set(ENABLE_ZLIB ON) | |
32 endif() | |
33 | |
34 if (ENABLE_MYSQL_BACKEND) | |
35 set(ENABLE_CRYPTO_OPTIONS ON) | |
36 set(ENABLE_SSL ON) | |
3 | 37 set(ENABLE_ZLIB ON) |
39 | 38 set(ENABLE_LOCALE ON) # iconv is needed |
39 set(ENABLE_WEB_CLIENT ON) # libcurl is needed | |
0 | 40 |
41 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") | |
42 set(ENABLE_OPENSSL_ENGINES ON) | |
43 endif() | |
44 endif() | |
45 | |
46 | |
47 ##################################################################### | |
48 ## Configure the Orthanc Framework | |
49 ##################################################################### | |
50 | |
54
b3de8c09c8b0
disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
39
diff
changeset
|
51 # Those modules of the Orthanc framework are not needed when dealing |
b3de8c09c8b0
disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
39
diff
changeset
|
52 # with databases |
b3de8c09c8b0
disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
39
diff
changeset
|
53 set(ENABLE_MODULE_IMAGES OFF) |
b3de8c09c8b0
disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
39
diff
changeset
|
54 set(ENABLE_MODULE_JOBS OFF) |
b3de8c09c8b0
disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
39
diff
changeset
|
55 set(ENABLE_MODULE_DICOM OFF) |
b3de8c09c8b0
disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
39
diff
changeset
|
56 |
0 | 57 include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) |
58 include_directories(${ORTHANC_ROOT}) | |
59 | |
60 | |
61 ##################################################################### | |
62 ## Common source files for the databases | |
63 ##################################################################### | |
64 | |
65 set(ORTHANC_DATABASES_ROOT ${CMAKE_CURRENT_LIST_DIR}/../..) | |
66 | |
67 set(DATABASES_SOURCES | |
68 ${ORTHANC_DATABASES_ROOT}/Framework/Common/BinaryStringValue.cpp | |
69 ${ORTHANC_DATABASES_ROOT}/Framework/Common/DatabaseManager.cpp | |
70 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Dictionary.cpp | |
71 ${ORTHANC_DATABASES_ROOT}/Framework/Common/FileValue.cpp | |
72 ${ORTHANC_DATABASES_ROOT}/Framework/Common/GenericFormatter.cpp | |
23
b2ff1cd2907a
handling of implicit transactions in DatabaseManager
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3
diff
changeset
|
73 ${ORTHANC_DATABASES_ROOT}/Framework/Common/ImplicitTransaction.cpp |
0 | 74 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Integer64Value.cpp |
75 ${ORTHANC_DATABASES_ROOT}/Framework/Common/NullValue.cpp | |
76 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Query.cpp | |
77 ${ORTHANC_DATABASES_ROOT}/Framework/Common/ResultBase.cpp | |
78 ${ORTHANC_DATABASES_ROOT}/Framework/Common/StatementLocation.cpp | |
79 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Utf8StringValue.cpp | |
80 ) | |
81 | |
82 | |
83 ##################################################################### | |
84 ## Configure SQLite if need be | |
85 ##################################################################### | |
86 | |
87 if (ENABLE_SQLITE_BACKEND) | |
88 list(APPEND DATABASES_SOURCES | |
89 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteDatabase.cpp | |
90 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteResult.cpp | |
91 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteStatement.cpp | |
92 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteTransaction.cpp | |
93 ) | |
94 endif() | |
95 | |
96 | |
97 ##################################################################### | |
98 ## Configure MySQL client (MariaDB) if need be | |
99 ##################################################################### | |
100 | |
101 if (ENABLE_MYSQL_BACKEND) | |
102 include(${CMAKE_CURRENT_LIST_DIR}/MariaDBConfiguration.cmake) | |
103 add_definitions(-DORTHANC_ENABLE_MYSQL=1) | |
104 list(APPEND DATABASES_SOURCES | |
105 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLDatabase.cpp | |
106 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLParameters.cpp | |
107 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLResult.cpp | |
108 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLStatement.cpp | |
109 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLTransaction.cpp | |
110 ${MYSQL_CLIENT_SOURCES} | |
111 ) | |
112 else() | |
113 unset(USE_SYSTEM_MYSQL_CLIENT CACHE) | |
114 add_definitions(-DORTHANC_ENABLE_MYSQL=0) | |
115 endif() | |
116 | |
117 | |
118 | |
119 ##################################################################### | |
120 ## Configure PostgreSQL client if need be | |
121 ##################################################################### | |
122 | |
123 if (ENABLE_POSTGRESQL_BACKEND) | |
124 include(${CMAKE_CURRENT_LIST_DIR}/PostgreSQLConfiguration.cmake) | |
125 add_definitions(-DORTHANC_ENABLE_POSTGRESQL=1) | |
126 list(APPEND DATABASES_SOURCES | |
127 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLDatabase.cpp | |
128 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLLargeObject.cpp | |
129 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLParameters.cpp | |
130 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLResult.cpp | |
131 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLStatement.cpp | |
132 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLTransaction.cpp | |
133 ${LIBPQ_SOURCES} | |
134 ) | |
135 else() | |
136 unset(USE_SYSTEM_LIBPQ CACHE) | |
137 add_definitions(-DORTHANC_ENABLE_POSTGRESQL=0) | |
138 endif() |