annotate Odbc/CMakeLists.txt @ 444:2ca939d02d39 pg-transactions

cleanup
author Alain Mazy <am@osimis.io>
date Wed, 10 Jan 2024 15:22:40 +0100
parents c1b0f3c4e1f5
children 2b797871eff6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
389
3d6886f3e5b3 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium
3d6886f3e5b3 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
5 # Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 #
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 # 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
8 # 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
9 # 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
10 # the License, or (at your option) any later version.
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 #
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # 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
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # 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
15 # Affero General Public License for more details.
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 #
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 # 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
18 # 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
19
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 cmake_minimum_required(VERSION 2.8)
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
22 project(OrthancOdbc)
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
341
5afa19dc8562 back to mainline
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 340
diff changeset
24 set(ORTHANC_PLUGIN_VERSION "mainline")
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1)
388
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
27 set(ORTHANC_OPTIMAL_VERSION_MINOR 12)
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
28 set(ORTHANC_OPTIMAL_VERSION_REVISION 0)
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 set(ORTHANC_FRAMEWORK_VERSION "mainline")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 else()
405
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
34 set(ORTHANC_FRAMEWORK_VERSION "1.12.0")
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 set(ENABLE_ODBC_BACKEND ON)
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 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 execute_process(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 COMMAND
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
49 ${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
50 "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
51 ERROR_VARIABLE Failure
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 OUTPUT_FILE ${AUTOGENERATED_DIR}/StorageVersion.rc
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
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 if (Failure)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 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
57 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 execute_process(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 COMMAND
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
62 ${ORTHANC_PLUGIN_VERSION} "ODBC index plugin" OrthancOdbcIndex.dll
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 "ODBC as a database back-end to Orthanc (index)"
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 ERROR_VARIABLE Failure
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 OUTPUT_FILE ${AUTOGENERATED_DIR}/IndexVersion.rc
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
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 if (Failure)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 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
70 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 set(INDEX_RESOURCES ${AUTOGENERATED_DIR}/IndexVersion.rc)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 set(STORAGE_RESOURCES ${AUTOGENERATED_DIR}/StorageVersion.rc)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 EmbedResources(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 ODBC_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 ODBC_PREPARE_STORAGE ${CMAKE_SOURCE_DIR}/Plugins/PrepareStorage.sql
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
388
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
82 if (EXISTS ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto)
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
83 add_custom_command(
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
84 COMMAND
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
85 ${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
86 DEPENDS
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
87 ProtobufCompiler
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
88 ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
89 OUTPUT
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
90 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
91 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.h
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
92 )
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
93
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
94 list(APPEND AUTOGENERATED_SOURCES
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
95 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
96 )
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
97 endif()
6aa19614ca20 implemented protobuf for odbc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 362
diff changeset
98
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 add_custom_target(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 AutogeneratedTarget
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 DEPENDS
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 ${AUTOGENERATED_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 add_library(FrameworkForPlugins STATIC
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 ${AUTOGENERATED_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 ${DATABASES_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 ${LTDL_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 ${UNIX_ODBC_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 Plugins/OdbcIndex.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 set_target_properties(FrameworkForPlugins PROPERTIES
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 POSITION_INDEPENDENT_CODE ON
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
120 add_library(OrthancOdbcIndex SHARED
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 ${INDEX_RESOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 Plugins/IndexPlugin.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
125 add_library(OrthancOdbcStorage SHARED
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 ${STORAGE_RESOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 Plugins/StoragePlugin.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 add_dependencies(FrameworkForPlugins AutogeneratedTarget)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
132 target_link_libraries(OrthancOdbcIndex FrameworkForPlugins)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
133 target_link_libraries(OrthancOdbcStorage FrameworkForPlugins)
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 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
136
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 add_definitions(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}"
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
141 set_target_properties(OrthancOdbcStorage PROPERTIES
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 VERSION ${ORTHANC_PLUGIN_VERSION}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 SOVERSION ${ORTHANC_PLUGIN_VERSION}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
147 set_target_properties(OrthancOdbcIndex PROPERTIES
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 VERSION ${ORTHANC_PLUGIN_VERSION}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 SOVERSION ${ORTHANC_PLUGIN_VERSION}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
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
425
c1b0f3c4e1f5 sync Orthanc code
Alain Mazy <am@osimis.io>
parents: 406
diff changeset
153 DefineSourceBasenameForTarget(OrthancOdbcIndex)
c1b0f3c4e1f5 sync Orthanc code
Alain Mazy <am@osimis.io>
parents: 406
diff changeset
154 DefineSourceBasenameForTarget(OrthancOdbcStorage)
c1b0f3c4e1f5 sync Orthanc code
Alain Mazy <am@osimis.io>
parents: 406
diff changeset
155
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 install(
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
157 TARGETS OrthancOdbcIndex OrthancOdbcStorage
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 RUNTIME DESTINATION lib # Destination for Windows
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 add_executable(UnitTests
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 ${AUTOGENERATED_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 ${DATABASES_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 ${GOOGLE_TEST_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 ${LTDL_SOURCES}
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 ${UNIX_ODBC_SOURCES}
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 Plugins/OdbcIndex.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 UnitTests/UnitTestsMain.cpp
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 add_dependencies(UnitTests AutogeneratedTarget)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES})
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 set_target_properties(UnitTests PROPERTIES
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 )
425
c1b0f3c4e1f5 sync Orthanc code
Alain Mazy <am@osimis.io>
parents: 406
diff changeset
180
c1b0f3c4e1f5 sync Orthanc code
Alain Mazy <am@osimis.io>
parents: 406
diff changeset
181 DefineSourceBasenameForTarget(UnitTests)