annotate Resources/CMake/DatabasesPluginConfiguration.cmake @ 401:a8774581adfc db-protobuf

replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Apr 2023 22:32:15 +0200
parents 2fd272ea8f00
children 1938ba8fba35
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
7cea966b6829 initial commit
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: 374
diff changeset
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium
3d6886f3e5b3 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 374
diff changeset
5 # Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 #
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 # This program is free software: you can redistribute it and/or
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # modify it under the terms of the GNU Affero General Public License
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # as published by the Free Software Foundation, either version 3 of
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # the License, or (at your option) any later version.
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 #
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # This program is distributed in the hope that it will be useful, but
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # Affero General Public License for more details.
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 #
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 # You should have received a copy of the GNU Affero General Public License
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
300
a116dbdf9118 replaced CMAKE_SOURCE_DIR by CMAKE_CURRENT_LIST_DIR in CMake scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 272
diff changeset
22 include(${CMAKE_CURRENT_LIST_DIR}/DatabasesFrameworkConfiguration.cmake)
a116dbdf9118 replaced CMAKE_SOURCE_DIR by CMAKE_CURRENT_LIST_DIR in CMake scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 272
diff changeset
23 include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/AutoGeneratedCode.cmake)
a116dbdf9118 replaced CMAKE_SOURCE_DIR by CMAKE_CURRENT_LIST_DIR in CMake scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 272
diff changeset
24 include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/Plugins/OrthancPluginsExports.cmake)
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 if (ORTHANC_SDK_VERSION STREQUAL "0.9.5")
372
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
28 set(ORTHANC_SDK_ROOT ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-0.9.5)
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
29 elseif (ORTHANC_SDK_VERSION STREQUAL "1.4.0")
372
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
30 set(ORTHANC_SDK_ROOT ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-1.4.0)
94
badc89b06477 upgrading orthanc sdk from 1.4.0 to 1.5.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 69
diff changeset
31 elseif (ORTHANC_SDK_VERSION STREQUAL "1.5.2")
372
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
32 set(ORTHANC_SDK_ROOT ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-1.5.2)
123
121ab36c87bd updating to Orthanc SDK 1.5.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 94
diff changeset
33 elseif (ORTHANC_SDK_VERSION STREQUAL "1.5.4")
372
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
34 set(ORTHANC_SDK_ROOT ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-1.5.4)
272
c7dc70a0a477 upgrade to Orthanc SDK 1.9.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 237
diff changeset
35 elseif (ORTHANC_SDK_VERSION STREQUAL "1.9.2")
372
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
36 set(ORTHANC_SDK_ROOT ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-1.9.2)
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
37 elseif (ORTHANC_SDK_VERSION STREQUAL "1.12.0")
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
38 set(ORTHANC_SDK_ROOT ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-1.12.0)
197
a57ca58c538a CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
39 elseif (ORTHANC_SDK_VERSION STREQUAL "framework")
a57ca58c538a CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
40 set(tmp ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include/)
a57ca58c538a CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
41 message(${tmp})
a57ca58c538a CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
42 if (NOT EXISTS ${tmp}/orthanc/OrthancCDatabasePlugin.h)
a57ca58c538a CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
43 message(FATAL_ERROR "Your copy of the Orthanc framework doesn't contain the Orthanc plugin SDK")
a57ca58c538a CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
44 endif()
372
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
45 set(ORTHANC_SDK_ROOT ${tmp})
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 else()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 message(FATAL_ERROR "Unsupported version of the Orthanc plugin SDK: ${ORTHANC_SDK_VERSION}")
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 endif()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 else ()
372
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
50 find_path(ORTHANC_SDK_ROOT orthanc/OrthancCDatabasePlugin.h
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
51 /usr/include
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
52 /usr/local/include
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
53 )
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
54
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
55 if (NOT ORTHANC_SDK_ROOT)
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
56 message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK")
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
57 endif()
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
58
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
59 check_include_file(${ORTHANC_SDK_ROOT}/orthanc/OrthancCDatabasePlugin.h HAVE_ORTHANC_H)
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 if (NOT HAVE_ORTHANC_H)
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK")
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 endif()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 endif()
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
372
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
65 include_directories(${ORTHANC_SDK_ROOT})
b5e2c1e48828 created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 359
diff changeset
66
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
129
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
68 if (NOT DEFINED ORTHANC_OPTIMAL_VERSION_MAJOR)
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
69 message(FATAL_ERROR "ORTHANC_OPTIMAL_VERSION_MAJOR is not defined")
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
70 endif()
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
71
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
72 if (NOT DEFINED ORTHANC_OPTIMAL_VERSION_MINOR)
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
73 message(FATAL_ERROR "ORTHANC_OPTIMAL_VERSION_MINOR is not defined")
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
74 endif()
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
75
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
76 if (NOT DEFINED ORTHANC_OPTIMAL_VERSION_REVISION)
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
77 message(FATAL_ERROR "ORTHANC_OPTIMAL_VERSION_REVISION is not defined")
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
78 endif()
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
79
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
80
69
19764fc60ade compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 68
diff changeset
81 add_definitions(
19764fc60ade compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 68
diff changeset
82 -DHAS_ORTHANC_EXCEPTION=1
152
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
83 -DORTHANC_BUILDING_SERVER_LIBRARY=0
69
19764fc60ade compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 68
diff changeset
84 -DORTHANC_ENABLE_PLUGINS=1
129
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
85 -DORTHANC_OPTIMAL_VERSION_MAJOR=${ORTHANC_OPTIMAL_VERSION_MAJOR}
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
86 -DORTHANC_OPTIMAL_VERSION_MINOR=${ORTHANC_OPTIMAL_VERSION_MINOR}
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 123
diff changeset
87 -DORTHANC_OPTIMAL_VERSION_REVISION=${ORTHANC_OPTIMAL_VERSION_REVISION}
69
19764fc60ade compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 68
diff changeset
88 )
19764fc60ade compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 68
diff changeset
89
19764fc60ade compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 68
diff changeset
90
394
2fd272ea8f00 fix msvc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 392
diff changeset
91 if ((STATIC_BUILD OR NOT USE_SYSTEM_PROTOBUF) AND
2fd272ea8f00 fix msvc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 392
diff changeset
92 CMAKE_SYSTEM_VERSION STREQUAL "LinuxStandardBase")
392
743cf36fb051 fix link on lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
93 # This is necessary, at least on LSB (Linux Standard Base),
743cf36fb051 fix link on lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
94 # otherwise the following error is generated: "undefined reference
743cf36fb051 fix link on lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
95 # to `__tls_get_addr'"
743cf36fb051 fix link on lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
96 add_definitions(-DGOOGLE_PROTOBUF_NO_THREADLOCAL=1)
743cf36fb051 fix link on lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
97 endif()
743cf36fb051 fix link on lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
98
743cf36fb051 fix link on lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 389
diff changeset
99
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 list(APPEND DATABASES_SOURCES
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 ${ORTHANC_CORE_SOURCES}
205
873e37048f96 renaming OrthancCppDatabasePlugin.h as DatabaseBackendAdapterV2.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 197
diff changeset
102 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/DatabaseBackendAdapterV2.cpp
212
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 205
diff changeset
103 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/DatabaseBackendAdapterV3.cpp
373
be7de633695c started DatabaseBackendAdapterV4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 372
diff changeset
104 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/DatabaseBackendAdapterV4.cpp
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/IndexBackend.cpp
374
4a3985088723 moved class IndexConnectionsPool out of DatabaseBackendAdapterV3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 373
diff changeset
106 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/IndexConnectionsPool.cpp
1
d17b2631bb67 starting StorageBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
107 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/StorageBackend.cpp
152
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
108 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Databases/DatabaseConstraint.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
109 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
110 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp
0
7cea966b6829 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 )