Mercurial > hg > orthanc-databases
annotate Odbc/CMakeLists.txt @ 528:fa6d3c5ada3d
release notes
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 22 Jul 2024 14:57:35 +0200 |
parents | 586b80ea397c |
children |
rev | line source |
---|---|
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
b5fb8b77ce4d
initial commit of ODBC framework
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:
489
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:
489
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:
diff
changeset
|
7 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
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:
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:
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:
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:
diff
changeset
|
12 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
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:
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:
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:
diff
changeset
|
16 # Affero General Public License for more details. |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 # |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
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:
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:
diff
changeset
|
20 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 cmake_minimum_required(VERSION 2.8) |
330 | 23 project(OrthancOdbc) |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
481 | 25 set(ORTHANC_PLUGIN_VERSION "mainline") |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
489
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
481
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.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:
481
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:
481
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:
481
diff
changeset
|
33 |
e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
481
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:
481
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:
481
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:
481
diff
changeset
|
37 # plugin will still start). |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) |
388
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
39 set(ORTHANC_OPTIMAL_VERSION_MINOR 12) |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
40 set(ORTHANC_OPTIMAL_VERSION_REVISION 0) |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline") |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 set(ORTHANC_FRAMEWORK_VERSION "mainline") |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
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") |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 endif() |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 set(ENABLE_ODBC_BACKEND ON) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 execute_process( |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 COMMAND |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py |
330 | 61 ${ORTHANC_PLUGIN_VERSION} "ODBC storage area plugin" OrthancOdbcStorage.dll |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 "ODBC as a database back-end to Orthanc (storage area)" |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 ERROR_VARIABLE Failure |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 OUTPUT_FILE ${AUTOGENERATED_DIR}/StorageVersion.rc |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 if (Failure) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 message(FATAL_ERROR "Error while computing the version information: ${Failure}") |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 endif() |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 execute_process( |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 COMMAND |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py |
330 | 74 ${ORTHANC_PLUGIN_VERSION} "ODBC index plugin" OrthancOdbcIndex.dll |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 "ODBC as a database back-end to Orthanc (index)" |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 ERROR_VARIABLE Failure |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 OUTPUT_FILE ${AUTOGENERATED_DIR}/IndexVersion.rc |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 if (Failure) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 message(FATAL_ERROR "Error while computing the version information: ${Failure}") |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 endif() |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 set(INDEX_RESOURCES ${AUTOGENERATED_DIR}/IndexVersion.rc) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 set(STORAGE_RESOURCES ${AUTOGENERATED_DIR}/StorageVersion.rc) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 endif() |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 EmbedResources( |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 ODBC_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 ODBC_PREPARE_STORAGE ${CMAKE_SOURCE_DIR}/Plugins/PrepareStorage.sql |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 |
388
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
94 if (EXISTS ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto) |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
95 add_custom_command( |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
96 COMMAND |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
97 ${PROTOC_EXECUTABLE} ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto --cpp_out=${AUTOGENERATED_DIR} -I${ORTHANC_SDK_ROOT}/orthanc/ |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
98 DEPENDS |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
99 ProtobufCompiler |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
100 ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
101 OUTPUT |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
102 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
103 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.h |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
104 ) |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
105 |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
106 list(APPEND AUTOGENERATED_SOURCES |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
107 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
108 ) |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
109 endif() |
6aa19614ca20
implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
362
diff
changeset
|
110 |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 add_custom_target( |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 AutogeneratedTarget |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 DEPENDS |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 ${AUTOGENERATED_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 add_library(FrameworkForPlugins STATIC |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 ${AUTOGENERATED_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 ${DATABASES_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 ${LTDL_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 ${UNIX_ODBC_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 Plugins/OdbcIndex.cpp |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 set_target_properties(FrameworkForPlugins PROPERTIES |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 POSITION_INDEPENDENT_CODE ON |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 |
330 | 132 add_library(OrthancOdbcIndex SHARED |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 ${INDEX_RESOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 Plugins/IndexPlugin.cpp |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 |
330 | 137 add_library(OrthancOdbcStorage SHARED |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 ${STORAGE_RESOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 Plugins/StoragePlugin.cpp |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 add_dependencies(FrameworkForPlugins AutogeneratedTarget) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 |
330 | 144 target_link_libraries(OrthancOdbcIndex FrameworkForPlugins) |
145 target_link_libraries(OrthancOdbcStorage FrameworkForPlugins) | |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 add_definitions( |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 |
330 | 153 set_target_properties(OrthancOdbcStorage PROPERTIES |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 VERSION ${ORTHANC_PLUGIN_VERSION} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 SOVERSION ${ORTHANC_PLUGIN_VERSION} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 |
330 | 159 set_target_properties(OrthancOdbcIndex PROPERTIES |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 VERSION ${ORTHANC_PLUGIN_VERSION} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 SOVERSION ${ORTHANC_PLUGIN_VERSION} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
163 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 install( |
330 | 166 TARGETS OrthancOdbcIndex OrthancOdbcStorage |
329
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
167 RUNTIME DESTINATION lib # Destination for Windows |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
169 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 add_executable(UnitTests |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 ${AUTOGENERATED_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 ${DATABASES_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 ${GOOGLE_TEST_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 ${LTDL_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 ${UNIX_ODBC_SOURCES} |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
178 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
179 Plugins/OdbcIndex.cpp |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 UnitTests/UnitTestsMain.cpp |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
181 ) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
182 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
183 add_dependencies(UnitTests AutogeneratedTarget) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES}) |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 set_target_properties(UnitTests PROPERTIES |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
187 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0 |
b5fb8b77ce4d
initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 ) |
425 | 189 |
441
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
190 if (COMMAND DefineSourceBasenameForTarget) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
191 DefineSourceBasenameForTarget(FrameworkForPlugins) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
192 DefineSourceBasenameForTarget(OrthancOdbcIndex) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
193 DefineSourceBasenameForTarget(OrthancOdbcStorage) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
194 DefineSourceBasenameForTarget(UnitTests) |
2b797871eff6
handling of DefineSourceBasenameForTarget for MySQL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
425
diff
changeset
|
195 endif() |