Mercurial > hg > orthanc-databases
annotate MySQL/CMakeLists.txt @ 524:48aba35fe64e large-queries
merged BEGIN and SET TRANSACTION statements
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 09 Jul 2024 16:30:52 +0200 |
parents | 586b80ea397c |
children | e1d3da372805 |
rev | line source |
---|---|
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
328
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
328
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
328
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:
503
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:
503
diff
changeset
|
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
459
ecd0b719cff5
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
442
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:
328
diff
changeset
|
7 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
328
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:
328
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:
328
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:
328
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:
328
diff
changeset
|
12 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
328
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:
328
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:
328
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:
328
diff
changeset
|
16 # Affero General Public License for more details. |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
328
diff
changeset
|
17 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
328
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:
328
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:
328
diff
changeset
|
20 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
328
diff
changeset
|
21 |
0 | 22 cmake_minimum_required(VERSION 2.8) |
23 project(OrthancMySQL) | |
24 | |
513 | 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:
462
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:
513
diff
changeset
|
28 set(ORTHANC_SDK_DEFAULT_VERSION "1.12.0") |
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:
462
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:
462
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 "0.9.5" "1.4.0" "1.5.2" "1.5.4" "1.9.2" "1.12.0" "1.12.3" "1.12.4") |
489
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
462
diff
changeset
|
33 |
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
462
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:
462
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:
462
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:
462
diff
changeset
|
37 # plugin will still start). |
129
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
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) |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
40 set(ORTHANC_OPTIMAL_VERSION_REVISION 0) |
129
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
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 | |
50 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake) | |
51 | |
52 set(ENABLE_MYSQL_BACKEND ON) | |
358
1280b40d6696
switch to OpenSSL 3.0.x
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
329
diff
changeset
|
53 set(OPENSSL_STATIC_VERSION "3.0" CACHE STRING "Force the use of OpenSSL 3.0.x" FORCE) |
0 | 54 |
55 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) | |
56 | |
38 | 57 |
58 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
59 execute_process( | |
60 COMMAND | |
167 | 61 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py |
38 | 62 ${ORTHANC_PLUGIN_VERSION} "MySQL storage area plugin" OrthancMySQLStorage.dll |
63 "MySQL as a database back-end to Orthanc (storage area)" | |
64 ERROR_VARIABLE Failure | |
65 OUTPUT_FILE ${AUTOGENERATED_DIR}/StorageVersion.rc | |
66 ) | |
67 | |
68 if (Failure) | |
69 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
70 endif() | |
71 | |
72 execute_process( | |
73 COMMAND | |
167 | 74 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py |
38 | 75 ${ORTHANC_PLUGIN_VERSION} "MySQL index plugin" OrthancMySQLIndex.dll |
76 "MySQL as a database back-end to Orthanc (index)" | |
77 ERROR_VARIABLE Failure | |
78 OUTPUT_FILE ${AUTOGENERATED_DIR}/IndexVersion.rc | |
79 ) | |
80 | |
81 if (Failure) | |
82 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
83 endif() | |
84 | |
85 set(INDEX_RESOURCES ${AUTOGENERATED_DIR}/IndexVersion.rc) | |
86 set(STORAGE_RESOURCES ${AUTOGENERATED_DIR}/StorageVersion.rc) | |
87 endif() | |
88 | |
89 | |
0 | 90 EmbedResources( |
87
48d445f756db
new extension implemented for MySQL: GetLastChangeIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
69
diff
changeset
|
91 MYSQL_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql |
48d445f756db
new extension implemented for MySQL: GetLastChangeIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
69
diff
changeset
|
92 MYSQL_GET_LAST_CHANGE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/GetLastChangeIndex.sql |
110
441a472bfd93
new extension implemented for MySQL: CreateInstance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
93
diff
changeset
|
93 MYSQL_CREATE_INSTANCE ${CMAKE_SOURCE_DIR}/Plugins/CreateInstance.sql |
424
95c413106a66
Introduced a procedure to delete resources (to be tested)
Alain Mazy <am@osimis.io>
parents:
413
diff
changeset
|
94 MYSQL_DELETE_RESOURCES ${CMAKE_SOURCE_DIR}/Plugins/DeleteResources.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 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
|
98 add_custom_command( |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
99 COMMAND |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
100 ${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
|
101 DEPENDS |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
102 ProtobufCompiler |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
103 ${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
|
104 OUTPUT |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
105 ${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
|
106 ${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
|
107 ) |
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 list(APPEND AUTOGENERATED_SOURCES |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
110 ${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
|
111 ) |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
112 endif() |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
113 |
b5e2c1e48828
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
114 |
155
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
115 add_custom_target( |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
116 AutogeneratedTarget |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
117 DEPENDS |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
118 ${AUTOGENERATED_SOURCES} |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
119 ) |
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
120 |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
121 add_library(FrameworkForPlugins STATIC |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
122 ${AUTOGENERATED_SOURCES} |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
123 ${DATABASES_SOURCES} |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
124 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
125 Plugins/MySQLIndex.cpp |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
126 Plugins/MySQLStorageArea.cpp |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
127 ) |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
128 |
316 | 129 set_target_properties(FrameworkForPlugins PROPERTIES |
130 POSITION_INDEPENDENT_CODE ON | |
131 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
132 ) |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
133 |
0 | 134 add_library(OrthancMySQLIndex SHARED |
38 | 135 ${INDEX_RESOURCES} |
24
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
17
diff
changeset
|
136 Plugins/IndexPlugin.cpp |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
137 ) |
24
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
17
diff
changeset
|
138 |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
139 add_library(OrthancMySQLStorage SHARED |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
140 ${STORAGE_RESOURCES} |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
141 Plugins/StoragePlugin.cpp |
0 | 142 ) |
143 | |
318
4a4087a79b9b
fix dependencies between targets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
317
diff
changeset
|
144 add_dependencies(FrameworkForPlugins AutogeneratedTarget) |
4a4087a79b9b
fix dependencies between targets
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
317
diff
changeset
|
145 |
315
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
146 target_link_libraries(OrthancMySQLIndex FrameworkForPlugins) |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
147 target_link_libraries(OrthancMySQLStorage FrameworkForPlugins) |
11641063ddb2
speed up compilation by sharing library between plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
301
diff
changeset
|
148 |
0 | 149 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") |
150 | |
151 add_definitions( | |
152 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" | |
153 ) | |
154 | |
2
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
155 set_target_properties(OrthancMySQLStorage PROPERTIES |
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
156 VERSION ${ORTHANC_PLUGIN_VERSION} |
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
157 SOVERSION ${ORTHANC_PLUGIN_VERSION} |
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
158 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 |
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
159 ) |
0 | 160 |
161 set_target_properties(OrthancMySQLIndex PROPERTIES | |
162 VERSION ${ORTHANC_PLUGIN_VERSION} | |
163 SOVERSION ${ORTHANC_PLUGIN_VERSION} | |
164 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
165 ) | |
166 | |
167 install( | |
2
17bce6a07b2b
storage plugin skeletons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
168 TARGETS OrthancMySQLIndex OrthancMySQLStorage |
0 | 169 RUNTIME DESTINATION lib # Destination for Windows |
170 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
171 ) | |
172 | |
173 | |
174 add_executable(UnitTests | |
175 Plugins/MySQLIndex.cpp | |
17 | 176 Plugins/MySQLStorageArea.cpp |
0 | 177 UnitTests/UnitTestsMain.cpp |
17 | 178 |
0 | 179 ${DATABASES_SOURCES} |
180 ${GOOGLE_TEST_SOURCES} | |
181 ${AUTOGENERATED_SOURCES} | |
182 ) | |
183 | |
155
23cf7def8e44
use of OrthancPluginsExports.cmake, avoid race conditions with EmbedResources.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
184 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
|
185 |
0 | 186 target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES}) |
187 set_target_properties(UnitTests PROPERTIES | |
188 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0 | |
189 ) | |
441
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
190 |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
191 if (COMMAND DefineSourceBasenameForTarget) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
192 DefineSourceBasenameForTarget(FrameworkForPlugins) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
193 DefineSourceBasenameForTarget(OrthancMySQLIndex) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
194 DefineSourceBasenameForTarget(OrthancMySQLStorage) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
195 DefineSourceBasenameForTarget(UnitTests) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
196 endif() |