annotate Resources/CMake/DatabasesFrameworkConfiguration.cmake @ 517:2155c39914a2

fix SDK 1.12.4 protobuf
author Alain Mazy <am@orthanc.team>
date Thu, 06 Jun 2024 12:34:43 +0200
parents 54d518dcd74a
children 2ab3d45c0b3c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Department, University Hospital of Liege, Belgium
507
54d518dcd74a updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 459
diff changeset
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium
54d518dcd74a updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 459
diff changeset
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
459
ecd0b719cff5 update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 409
diff changeset
6 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 #
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # This program is free software: you can redistribute it and/or
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # modify it under the terms of the GNU Affero General Public License
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # as published by the Free Software Foundation, either version 3 of
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # the License, or (at your option) any later version.
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 #
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful, but
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 # Affero General Public License for more details.
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 #
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 # You should have received a copy of the GNU Affero General Public License
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 ## Enable the Orthanc subcomponents depending on the configuration
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 if (ENABLE_SQLITE_BACKEND)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 set(ENABLE_SQLITE ON)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 endif()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 if (ENABLE_POSTGRESQL_BACKEND)
80
16df1a6ea452 Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 67
diff changeset
32 set(ENABLE_CRYPTO_OPTIONS ON)
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 set(ENABLE_ZLIB ON)
358
1280b40d6696 switch to OpenSSL 3.0.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 332
diff changeset
34 set(ENABLE_OPENSSL_ENGINES ON)
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 endif()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 if (ENABLE_MYSQL_BACKEND)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 set(ENABLE_CRYPTO_OPTIONS ON)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 set(ENABLE_SSL ON)
3
e490cdd766b9 fix mysql
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
40 set(ENABLE_ZLIB ON)
39
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 30
diff changeset
41 set(ENABLE_LOCALE ON) # iconv is needed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 30
diff changeset
42 set(ENABLE_WEB_CLIENT ON) # libcurl is needed
358
1280b40d6696 switch to OpenSSL 3.0.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 332
diff changeset
43 set(ENABLE_OPENSSL_ENGINES ON)
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 endif()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
46 if (ENABLE_ODBC_BACKEND)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
47 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
48
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
49
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 ## Configure the Orthanc Framework
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
156
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
55 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
284
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
56 if (ORTHANC_FRAMEWORK_USE_SHARED)
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
57 include(FindBoost)
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
58 find_package(Boost COMPONENTS regex thread)
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
59
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
60 if (NOT Boost_FOUND)
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
61 message(FATAL_ERROR "Unable to locate Boost on this system")
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
62 endif()
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
63
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
64 link_libraries(${Boost_LIBRARIES} jsoncpp)
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
65 endif()
64bf8914f02e sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 245
diff changeset
66
156
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
67 link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES})
54
b3de8c09c8b0 disable of Orthanc modules that are useless for databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 39
diff changeset
68
156
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
69 if (ENABLE_SQLITE_BACKEND)
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
70 add_definitions(-DORTHANC_ENABLE_SQLITE=1)
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
71 endif()
409
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
72
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
73 # These parameters should *NOT* be modified by the user: System-wide
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
74 # installations expect only dynamic linking
156
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
75 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
409
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
76 set(USE_SYSTEM_OPENSSL ON CACHE BOOL "Use the system version of OpenSSL")
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
77 set(USE_SYSTEM_PROTOBUF ON CACHE BOOL "Use the system version of Google Protocol Buffers")
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
78
156
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
79 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
80 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
409
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
81
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
82 set(ENABLE_OPENSSL_ENGINES ON CACHE INTERNAL "")
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
83
300
a116dbdf9118 replaced CMAKE_SOURCE_DIR by CMAKE_CURRENT_LIST_DIR in CMake scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 299
diff changeset
84 include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/GoogleTestConfiguration.cmake)
409
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
85 include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/OpenSslConfiguration.cmake)
e25f4500b531 fix linking against system-wide Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
86 include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/ProtobufConfiguration.cmake)
156
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
87
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
88 else()
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
89 # Those modules of the Orthanc framework are not needed when dealing
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
90 # with databases
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
91 set(ENABLE_MODULE_IMAGES OFF)
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
92 set(ENABLE_MODULE_JOBS OFF)
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
93 set(ENABLE_MODULE_DICOM OFF)
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
94
167
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 156
diff changeset
95 include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkConfiguration.cmake)
286
eb03551d3a5f improved CMakeLists.txt
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 284
diff changeset
96 include_directories(${ORTHANC_FRAMEWORK_ROOT})
156
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
97 endif()
710537acb488 dynamic linking against the system-wide Orthanc framework library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 152
diff changeset
98
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 ## Common source files for the databases
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 set(ORTHANC_DATABASES_ROOT ${CMAKE_CURRENT_LIST_DIR}/../..)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 set(DATABASES_SOURCES
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 ${ORTHANC_DATABASES_ROOT}/Framework/Common/BinaryStringValue.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 ${ORTHANC_DATABASES_ROOT}/Framework/Common/DatabaseManager.cpp
299
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 298
diff changeset
110 ${ORTHANC_DATABASES_ROOT}/Framework/Common/DatabasesEnumerations.cpp
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Dictionary.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 ${ORTHANC_DATABASES_ROOT}/Framework/Common/GenericFormatter.cpp
298
8f655f308de9 added IResult::Print()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 286
diff changeset
113 ${ORTHANC_DATABASES_ROOT}/Framework/Common/IResult.cpp
23
b2ff1cd2907a handling of implicit transactions in DatabaseManager
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3
diff changeset
114 ${ORTHANC_DATABASES_ROOT}/Framework/Common/ImplicitTransaction.cpp
244
02cd7254c949 separating class InputFileValue from FileValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 226
diff changeset
115 ${ORTHANC_DATABASES_ROOT}/Framework/Common/InputFileValue.cpp
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Integer64Value.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 ${ORTHANC_DATABASES_ROOT}/Framework/Common/NullValue.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Query.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 ${ORTHANC_DATABASES_ROOT}/Framework/Common/ResultBase.cpp
245
9d00e5e073e8 rename FileValue as ResultFileValue
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 244
diff changeset
120 ${ORTHANC_DATABASES_ROOT}/Framework/Common/ResultFileValue.cpp
226
a4918d57435c DatabaseManager doesn't IDatabaseFactory anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 193
diff changeset
121 ${ORTHANC_DATABASES_ROOT}/Framework/Common/RetryDatabaseFactory.cpp
a4918d57435c DatabaseManager doesn't IDatabaseFactory anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 193
diff changeset
122 ${ORTHANC_DATABASES_ROOT}/Framework/Common/RetryDatabaseFactory.cpp
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 ${ORTHANC_DATABASES_ROOT}/Framework/Common/StatementLocation.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 ${ORTHANC_DATABASES_ROOT}/Framework/Common/Utf8StringValue.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 )
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 ## Configure SQLite if need be
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 if (ENABLE_SQLITE_BACKEND)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 list(APPEND DATABASES_SOURCES
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteDatabase.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteResult.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteStatement.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 ${ORTHANC_DATABASES_ROOT}/Framework/SQLite/SQLiteTransaction.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 )
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 endif()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 ## Configure MySQL client (MariaDB) if need be
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 if (ENABLE_MYSQL_BACKEND)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 include(${CMAKE_CURRENT_LIST_DIR}/MariaDBConfiguration.cmake)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 add_definitions(-DORTHANC_ENABLE_MYSQL=1)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 list(APPEND DATABASES_SOURCES
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLDatabase.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLParameters.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLResult.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLStatement.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 ${ORTHANC_DATABASES_ROOT}/Framework/MySQL/MySQLTransaction.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 ${MYSQL_CLIENT_SOURCES}
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 )
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 else()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 unset(USE_SYSTEM_MYSQL_CLIENT CACHE)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 add_definitions(-DORTHANC_ENABLE_MYSQL=0)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 endif()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 ## Configure PostgreSQL client if need be
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 #####################################################################
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 if (ENABLE_POSTGRESQL_BACKEND)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 include(${CMAKE_CURRENT_LIST_DIR}/PostgreSQLConfiguration.cmake)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 add_definitions(-DORTHANC_ENABLE_POSTGRESQL=1)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 list(APPEND DATABASES_SOURCES
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLDatabase.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLLargeObject.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLParameters.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLResult.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLStatement.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 ${ORTHANC_DATABASES_ROOT}/Framework/PostgreSQL/PostgreSQLTransaction.cpp
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 ${LIBPQ_SOURCES}
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 )
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 else()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 unset(USE_SYSTEM_LIBPQ CACHE)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 add_definitions(-DORTHANC_ENABLE_POSTGRESQL=0)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 endif()
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
184
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
185
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
186
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
187 #####################################################################
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
188 ## Configure ODBC if need be
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
189 #####################################################################
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
190
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
191 if (ENABLE_ODBC_BACKEND)
332
2592c0e9b724 fix link on windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 331
diff changeset
192 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
2592c0e9b724 fix link on windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 331
diff changeset
193 link_libraries(odbc32)
2592c0e9b724 fix link on windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 331
diff changeset
194 else()
331
674bbb9d1c83 added OdbcEnvironment::GlobalInitialization()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
195 include(${CMAKE_CURRENT_LIST_DIR}/UnixOdbcConfiguration.cmake)
674bbb9d1c83 added OdbcEnvironment::GlobalInitialization()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
196 endif()
674bbb9d1c83 added OdbcEnvironment::GlobalInitialization()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
197
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
198 add_definitions(-DORTHANC_ENABLE_ODBC=1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
199 list(APPEND DATABASES_SOURCES
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
200 ${ORTHANC_DATABASES_ROOT}/Framework/Odbc/OdbcDatabase.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
201 ${ORTHANC_DATABASES_ROOT}/Framework/Odbc/OdbcEnvironment.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
202 ${ORTHANC_DATABASES_ROOT}/Framework/Odbc/OdbcPreparedStatement.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
203 ${ORTHANC_DATABASES_ROOT}/Framework/Odbc/OdbcResult.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
204 ${ORTHANC_DATABASES_ROOT}/Framework/Odbc/OdbcStatement.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
205 ${LIBPQ_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
206 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
207 else()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
208 unset(USE_SYSTEM_UNIX_ODBC)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
209 unset(USE_SYSTEM_LTDL)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
210 add_definitions(-DORTHANC_ENABLE_ODBC=0)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
211 endif()