comparison Odbc/CMakeLists.txt @ 569:f18e46d7dbf8 attach-custom-data

merged find-refactoring -> attach-custom-data
author Alain Mazy <am@orthanc.team>
date Tue, 24 Sep 2024 15:04:21 +0200
parents 586b80ea397c
children
comparison
equal deleted inserted replaced
368:82f73188b58d 569:f18e46d7dbf8
1 # Orthanc - A Lightweight, RESTful DICOM Store 1 # Orthanc - A Lightweight, RESTful DICOM Store
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics 2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
3 # Department, University Hospital of Liege, Belgium 3 # Department, University Hospital of Liege, Belgium
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium 4 # Copyright (C) 2017-2023 Osimis S.A., Belgium
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
6 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
5 # 7 #
6 # This program is free software: you can redistribute it and/or 8 # This program is free software: you can redistribute it and/or
7 # modify it under the terms of the GNU Affero General Public License 9 # modify it under the terms of the GNU Affero General Public License
8 # as published by the Free Software Foundation, either version 3 of 10 # as published by the Free Software Foundation, either version 3 of
9 # the License, or (at your option) any later version. 11 # the License, or (at your option) any later version.
18 20
19 21
20 cmake_minimum_required(VERSION 2.8) 22 cmake_minimum_required(VERSION 2.8)
21 project(OrthancOdbc) 23 project(OrthancOdbc)
22 24
23 set(ORTHANC_PLUGIN_VERSION "1.1") 25 set(ORTHANC_PLUGIN_VERSION "mainline")
24 26
27 # This is the preferred version of the Orthanc SDK for this plugin
28 set(ORTHANC_SDK_DEFAULT_VERSION "1.12.0")
29
30 # This is the list of the versions of the Orthanc SDK against which
31 # this plugin will compile
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")
33
34 # This is the minimal version of the Orthanc runtime that will provide
35 # best performance. If the version of the Orthanc runtime is below
36 # this minimal version, a warning message will be printed (but the
37 # plugin will still start).
25 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) 38 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1)
26 set(ORTHANC_OPTIMAL_VERSION_MINOR 9) 39 set(ORTHANC_OPTIMAL_VERSION_MINOR 12)
27 set(ORTHANC_OPTIMAL_VERSION_REVISION 2) 40 set(ORTHANC_OPTIMAL_VERSION_REVISION 0)
28 41
29 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline") 42 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
30 set(ORTHANC_FRAMEWORK_VERSION "mainline") 43 set(ORTHANC_FRAMEWORK_VERSION "mainline")
31 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") 44 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
32 else() 45 else()
33 set(ORTHANC_FRAMEWORK_VERSION "1.9.6") 46 set(ORTHANC_FRAMEWORK_VERSION "1.12.4")
34 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") 47 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
35 endif() 48 endif()
36 49
37 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake) 50 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake)
38 51
75 88
76 EmbedResources( 89 EmbedResources(
77 ODBC_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql 90 ODBC_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql
78 ODBC_PREPARE_STORAGE ${CMAKE_SOURCE_DIR}/Plugins/PrepareStorage.sql 91 ODBC_PREPARE_STORAGE ${CMAKE_SOURCE_DIR}/Plugins/PrepareStorage.sql
79 ) 92 )
93
94 if (EXISTS ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto)
95 add_custom_command(
96 COMMAND
97 ${PROTOC_EXECUTABLE} ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto --cpp_out=${AUTOGENERATED_DIR} -I${ORTHANC_SDK_ROOT}/orthanc/
98 DEPENDS
99 ProtobufCompiler
100 ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto
101 OUTPUT
102 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc
103 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.h
104 )
105
106 list(APPEND AUTOGENERATED_SOURCES
107 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc
108 )
109 endif()
80 110
81 add_custom_target( 111 add_custom_target(
82 AutogeneratedTarget 112 AutogeneratedTarget
83 DEPENDS 113 DEPENDS
84 ${AUTOGENERATED_SOURCES} 114 ${AUTOGENERATED_SOURCES}
154 184
155 target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES}) 185 target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES})
156 set_target_properties(UnitTests PROPERTIES 186 set_target_properties(UnitTests PROPERTIES
157 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0 187 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0
158 ) 188 )
189
190 if (COMMAND DefineSourceBasenameForTarget)
191 DefineSourceBasenameForTarget(FrameworkForPlugins)
192 DefineSourceBasenameForTarget(OrthancOdbcIndex)
193 DefineSourceBasenameForTarget(OrthancOdbcStorage)
194 DefineSourceBasenameForTarget(UnitTests)
195 endif()