Mercurial > hg > orthanc-databases
annotate PostgreSQL/CMakeLists.txt @ 528:fa6d3c5ada3d
release notes
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 22 Jul 2024 14:57:35 +0200 |
parents | 586b80ea397c |
children | a8f9d44e7842 |
rev | line source |
---|---|
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
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:
495
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:
495
diff
changeset
|
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
459
ecd0b719cff5
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
441
diff
changeset
|
6 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
7 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
8 # This program is free software: you can redistribute it and/or |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
9 # modify it under the terms of the GNU Affero General Public License |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
10 # as published by the Free Software Foundation, either version 3 of |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
11 # the License, or (at your option) any later version. |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
12 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
13 # This program is distributed in the hope that it will be useful, but |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
14 # WITHOUT ANY WARRANTY; without even the implied warranty of |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
16 # Affero General Public License for more details. |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
17 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
18 # You should have received a copy of the GNU Affero General Public License |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
20 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
21 |
0 | 22 cmake_minimum_required(VERSION 2.8) |
23 project(OrthancPostgreSQL) | |
24 | |
495 | 25 set(ORTHANC_PLUGIN_VERSION "mainline") |
0 | 26 |
489
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
475
diff
changeset
|
27 # This is the preferred version of the Orthanc SDK for this plugin |
519
586b80ea397c
back to previous default SDK since 1.12.4 is not required for plugin name logging
Alain Mazy <am@orthanc.team>
parents:
511
diff
changeset
|
28 set(ORTHANC_SDK_DEFAULT_VERSION "1.12.3") |
462
bba27bbef7e0
use Orthanc SDK 1.12.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
459
diff
changeset
|
29 |
489
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
475
diff
changeset
|
30 # This is the list of the versions of the Orthanc SDK against which |
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
475
diff
changeset
|
31 # this plugin will compile |
511
51a78b3f96bb
use Framework 1.12.4 by default
Alain Mazy <am@orthanc.team>
parents:
507
diff
changeset
|
32 set(ORTHANC_SDK_COMPATIBLE_VERSIONS "1.12.3" "1.12.4") |
489
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
475
diff
changeset
|
33 |
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
475
diff
changeset
|
34 # This is the minimal version of the Orthanc runtime that will provide |
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
475
diff
changeset
|
35 # best performance. If the version of the Orthanc runtime is below |
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
475
diff
changeset
|
36 # this minimal version, a warning message will be printed (but the |
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
475
diff
changeset
|
37 # plugin will still start). |
129
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
126
diff
changeset
|
38 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) |
372
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
39 set(ORTHANC_OPTIMAL_VERSION_MINOR 12) |
466
daaa35ddba54
PostgreSQL plugin uses SDK 1.12.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
465
diff
changeset
|
40 set(ORTHANC_OPTIMAL_VERSION_REVISION 3) |
129
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
126
diff
changeset
|
41 |
0 | 42 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline") |
43 set(ORTHANC_FRAMEWORK_VERSION "mainline") | |
44 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") | |
45 else() | |
511
51a78b3f96bb
use Framework 1.12.4 by default
Alain Mazy <am@orthanc.team>
parents:
507
diff
changeset
|
46 set(ORTHANC_FRAMEWORK_VERSION "1.12.4") |
0 | 47 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") |
48 endif() | |
49 | |
172
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
167
diff
changeset
|
50 set(ENABLE_SSL ON) |
0 | 51 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake) |
52 | |
53 set(ENABLE_POSTGRESQL_BACKEND ON) | |
358
1280b40d6696
switch to OpenSSL 3.0.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
329
diff
changeset
|
54 set(OPENSSL_STATIC_VERSION "3.0" CACHE STRING "Force the use of OpenSSL 3.0.x" FORCE) |
172
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
167
diff
changeset
|
55 |
0 | 56 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) |
57 | |
36 | 58 |
59 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
60 execute_process( | |
61 COMMAND | |
167 | 62 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py |
36 | 63 ${ORTHANC_PLUGIN_VERSION} "PostgreSQL storage area plugin" OrthancPostgreSQLStorage.dll |
64 "PostgreSQL as a database back-end to Orthanc (storage area)" | |
65 ERROR_VARIABLE Failure | |
66 OUTPUT_FILE ${AUTOGENERATED_DIR}/StorageVersion.rc | |
67 ) | |
68 | |
69 if (Failure) | |
70 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
71 endif() | |
72 | |
73 execute_process( | |
74 COMMAND | |
167 | 75 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py |
36 | 76 ${ORTHANC_PLUGIN_VERSION} "PostgreSQL index plugin" OrthancPostgreSQLIndex.dll |
77 "PostgreSQL as a database back-end to Orthanc (index)" | |
78 ERROR_VARIABLE Failure | |
79 OUTPUT_FILE ${AUTOGENERATED_DIR}/IndexVersion.rc | |
80 ) | |
81 | |
82 if (Failure) | |
83 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
84 endif() | |
85 | |
86 set(INDEX_RESOURCES ${AUTOGENERATED_DIR}/IndexVersion.rc) | |
87 set(STORAGE_RESOURCES ${AUTOGENERATED_DIR}/StorageVersion.rc) | |
88 endif() | |
89 | |
90 | |
0 | 91 EmbedResources( |
448
f2427f94d879
added downgrade script + renames version
Alain Mazy <am@osimis.io>
parents:
437
diff
changeset
|
92 POSTGRESQL_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/SQL/PrepareIndex.sql |
467
ff84104f7842
renamed v6.2 to REV2 + removed 'default' TransactionMode + renamed 'READ COMMITTED' into 'ReadCommitted'
Alain Mazy <am@osimis.io>
parents:
466
diff
changeset
|
93 POSTGRESQL_UPGRADE_UNKNOWN_TO_REV1 ${CMAKE_SOURCE_DIR}/Plugins/SQL/Upgrades/UnknownToRev1.sql |
ff84104f7842
renamed v6.2 to REV2 + removed 'default' TransactionMode + renamed 'READ COMMITTED' into 'ReadCommitted'
Alain Mazy <am@osimis.io>
parents:
466
diff
changeset
|
94 POSTGRESQL_UPGRADE_REV1_TO_REV2 ${CMAKE_SOURCE_DIR}/Plugins/SQL/Upgrades/Rev1ToRev2.sql |
0 | 95 ) |
96 | |
372
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
97 |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
98 if (EXISTS ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto) |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
99 add_custom_command( |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
100 COMMAND |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
101 ${PROTOC_EXECUTABLE} ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto --cpp_out=${AUTOGENERATED_DIR} -I${ORTHANC_SDK_ROOT}/orthanc/ |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
102 DEPENDS |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
103 ProtobufCompiler |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
104 ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
105 OUTPUT |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
106 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
107 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.h |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
108 ) |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
109 |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
110 list(APPEND AUTOGENERATED_SOURCES |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
111 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
112 ) |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
113 endif() |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
114 |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
115 |
155
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
116 add_custom_target( |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
117 AutogeneratedTarget |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
118 DEPENDS |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
119 ${AUTOGENERATED_SOURCES} |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
120 ) |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
121 |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
122 add_library(FrameworkForPlugins STATIC |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
123 ${AUTOGENERATED_SOURCES} |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
124 ${DATABASES_SOURCES} |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
125 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
126 Plugins/PostgreSQLIndex.cpp |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
127 Plugins/PostgreSQLStorageArea.cpp |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
128 ) |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
129 |
316 | 130 set_target_properties(FrameworkForPlugins PROPERTIES |
131 POSITION_INDEPENDENT_CODE ON | |
132 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
133 ) |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
134 |
0 | 135 add_library(OrthancPostgreSQLIndex SHARED |
36 | 136 ${INDEX_RESOURCES} |
24
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
14
diff
changeset
|
137 Plugins/IndexPlugin.cpp |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
138 ) |
24
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
14
diff
changeset
|
139 |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
140 add_library(OrthancPostgreSQLStorage SHARED |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
141 ${STORAGE_RESOURCES} |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
142 Plugins/StoragePlugin.cpp |
0 | 143 ) |
144 | |
318
4a4087a79b9b
fix dependencies between targets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
316
diff
changeset
|
145 add_dependencies(FrameworkForPlugins AutogeneratedTarget) |
4a4087a79b9b
fix dependencies between targets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
316
diff
changeset
|
146 |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
147 target_link_libraries(OrthancPostgreSQLIndex FrameworkForPlugins) |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
148 target_link_libraries(OrthancPostgreSQLStorage FrameworkForPlugins) |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
287
diff
changeset
|
149 |
0 | 150 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") |
151 | |
152 add_definitions( | |
153 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" | |
154 ) | |
155 | |
2
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
156 set_target_properties(OrthancPostgreSQLStorage PROPERTIES |
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
157 VERSION ${ORTHANC_PLUGIN_VERSION} |
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
158 SOVERSION ${ORTHANC_PLUGIN_VERSION} |
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
159 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 |
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
160 ) |
0 | 161 |
162 set_target_properties(OrthancPostgreSQLIndex PROPERTIES | |
163 VERSION ${ORTHANC_PLUGIN_VERSION} | |
164 SOVERSION ${ORTHANC_PLUGIN_VERSION} | |
165 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
166 ) | |
167 | |
425 | 168 |
0 | 169 install( |
2
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
170 TARGETS OrthancPostgreSQLIndex OrthancPostgreSQLStorage |
0 | 171 RUNTIME DESTINATION lib # Destination for Windows |
172 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
173 ) | |
174 | |
175 | |
176 add_executable(UnitTests | |
177 Plugins/PostgreSQLIndex.cpp | |
14
9774802fd05f
PostgreSQLStorageArea working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2
diff
changeset
|
178 Plugins/PostgreSQLStorageArea.cpp |
9774802fd05f
PostgreSQLStorageArea working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2
diff
changeset
|
179 UnitTests/PostgreSQLTests.cpp |
0 | 180 UnitTests/UnitTestsMain.cpp |
181 ${DATABASES_SOURCES} | |
182 ${GOOGLE_TEST_SOURCES} | |
183 ${AUTOGENERATED_SOURCES} | |
184 ) | |
185 | |
155
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
186 add_dependencies(UnitTests AutogeneratedTarget) |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
187 |
0 | 188 target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES}) |
189 set_target_properties(UnitTests PROPERTIES | |
190 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0 | |
191 ) | |
425 | 192 |
441
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
193 if (COMMAND DefineSourceBasenameForTarget) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
194 DefineSourceBasenameForTarget(FrameworkForPlugins) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
195 DefineSourceBasenameForTarget(OrthancPostgreSQLIndex) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
196 DefineSourceBasenameForTarget(OrthancPostgreSQLStorage) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
197 DefineSourceBasenameForTarget(UnitTests) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
198 endif() |