Mercurial > hg > orthanc-databases
annotate Resources/CMake/DatabasesFrameworkConfiguration.cmake @ 98:c24d05cb72c1 db-changes
closing db-changes branch
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Jan 2019 14:38:42 +0100 |
parents | ff2d56d37bfd |
children | 4cd7e45b671e |
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 | |
67 | 4 # Copyright (C) 2017-2019 Osimis S.A., Belgium |
0 | 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) | |
81
515a783630df
injecting fix to issue 105 into the mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
30 set(ENABLE_CRYPTO_OPTIONS ON) |
0 | 31 set(ENABLE_SSL ON) |
32 set(ENABLE_ZLIB ON) | |
83 | 33 |
34 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") | |
35 set(ENABLE_OPENSSL_ENGINES ON) | |
36 endif() | |
0 | 37 endif() |
38 | |
39 if (ENABLE_MYSQL_BACKEND) | |
40 set(ENABLE_CRYPTO_OPTIONS ON) | |
41 set(ENABLE_SSL ON) | |
3 | 42 set(ENABLE_ZLIB ON) |
39 | 43 set(ENABLE_LOCALE ON) # iconv is needed |
44 set(ENABLE_WEB_CLIENT ON) # libcurl is needed | |
0 | 45 |
46 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") | |
47 set(ENABLE_OPENSSL_ENGINES ON) | |
48 endif() | |
49 endif() | |
50 | |
51 | |
52 ##################################################################### | |
53 ## Configure the Orthanc Framework | |
54 ##################################################################### | |
55 | |
54
b3de8c09c8b0
disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
39
diff
changeset
|
56 # 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
|
57 # with databases |
b3de8c09c8b0
disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
39
diff
changeset
|
58 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
|
59 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
|
60 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
|
61 |
0 | 62 include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) |
63 include_directories(${ORTHANC_ROOT}) | |
64 | |
65 | |
66 ##################################################################### | |
67 ## Common source files for the databases | |
68 ##################################################################### | |
69 | |
70 set(ORTHANC_DATABASES_ROOT ${CMAKE_CURRENT_LIST_DIR}/../..) | |
71 | |
72 set(DATABASES_SOURCES | |
73 ${ORTHANC_DATABASES_ROOT}/Framework/Common/BinaryStringValue.cpp | |
74 ${ORTHANC_DATABASES_ROOT}/Framework/Common/DatabaseManager.cpp | |
75 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Dictionary.cpp | |
76 ${ORTHANC_DATABASES_ROOT}/Framework/Common/FileValue.cpp | |
77 ${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
|
78 ${ORTHANC_DATABASES_ROOT}/Framework/Common/ImplicitTransaction.cpp |
0 | 79 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Integer64Value.cpp |
80 ${ORTHANC_DATABASES_ROOT}/Framework/Common/NullValue.cpp | |
81 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Query.cpp | |
82 ${ORTHANC_DATABASES_ROOT}/Framework/Common/ResultBase.cpp | |
83 ${ORTHANC_DATABASES_ROOT}/Framework/Common/StatementLocation.cpp | |
84 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Utf8StringValue.cpp | |
85 ) | |
86 | |
87 | |
88 ##################################################################### | |
89 ## Configure SQLite if need be | |
90 ##################################################################### | |
91 | |
92 if (ENABLE_SQLITE_BACKEND) | |
93 list(APPEND DATABASES_SOURCES | |
94 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteDatabase.cpp | |
95 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteResult.cpp | |
96 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteStatement.cpp | |
97 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteTransaction.cpp | |
98 ) | |
99 endif() | |
100 | |
101 | |
102 ##################################################################### | |
103 ## Configure MySQL client (MariaDB) if need be | |
104 ##################################################################### | |
105 | |
106 if (ENABLE_MYSQL_BACKEND) | |
107 include(${CMAKE_CURRENT_LIST_DIR}/MariaDBConfiguration.cmake) | |
108 add_definitions(-DORTHANC_ENABLE_MYSQL=1) | |
109 list(APPEND DATABASES_SOURCES | |
110 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLDatabase.cpp | |
111 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLParameters.cpp | |
112 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLResult.cpp | |
113 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLStatement.cpp | |
114 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLTransaction.cpp | |
115 ${MYSQL_CLIENT_SOURCES} | |
116 ) | |
117 else() | |
118 unset(USE_SYSTEM_MYSQL_CLIENT CACHE) | |
119 add_definitions(-DORTHANC_ENABLE_MYSQL=0) | |
120 endif() | |
121 | |
122 | |
123 | |
124 ##################################################################### | |
125 ## Configure PostgreSQL client if need be | |
126 ##################################################################### | |
127 | |
128 if (ENABLE_POSTGRESQL_BACKEND) | |
129 include(${CMAKE_CURRENT_LIST_DIR}/PostgreSQLConfiguration.cmake) | |
130 add_definitions(-DORTHANC_ENABLE_POSTGRESQL=1) | |
131 list(APPEND DATABASES_SOURCES | |
132 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLDatabase.cpp | |
133 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLLargeObject.cpp | |
134 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLParameters.cpp | |
135 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLResult.cpp | |
136 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLStatement.cpp | |
137 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLTransaction.cpp | |
138 ${LIBPQ_SOURCES} | |
139 ) | |
140 else() | |
141 unset(USE_SYSTEM_LIBPQ CACHE) | |
142 add_definitions(-DORTHANC_ENABLE_POSTGRESQL=0) | |
143 endif() |