Mercurial > hg > orthanc-databases
annotate Resources/CMake/DatabasesPluginConfiguration.cmake @ 372:b5e2c1e48828 db-protobuf
created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 Mar 2023 11:40:07 +0200 |
parents | 16aac0287485 |
children | be7de633695c |
rev | line source |
---|---|
0 | 1 # Orthanc - A Lightweight, RESTful DICOM Store |
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
3 # Department, University Hospital of Liege, Belgium | |
359
16aac0287485
copyright upgraded to 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium |
16aac0287485
copyright upgraded to 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
0 | 6 # |
7 # This program is free software: you can redistribute it and/or | |
8 # modify it under the terms of the GNU Affero General Public License | |
9 # as published by the Free Software Foundation, either version 3 of | |
10 # the License, or (at your option) any later version. | |
11 # | |
12 # This program is distributed in the hope that it will be useful, but | |
13 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 # Affero General Public License for more details. | |
16 # | |
17 # You should have received a copy of the GNU Affero General Public License | |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | |
20 | |
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 | 25 |
26 if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) | |
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 | 46 else() |
47 message(FATAL_ERROR "Unsupported version of the Orthanc plugin SDK: ${ORTHANC_SDK_VERSION}") | |
48 endif() | |
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 | 60 if (NOT HAVE_ORTHANC_H) |
61 message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK") | |
62 endif() | |
63 endif() | |
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 | 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 | 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 |
0 | 91 list(APPEND DATABASES_SOURCES |
92 ${ORTHANC_CORE_SOURCES} | |
205
873e37048f96
renaming OrthancCppDatabasePlugin.h as DatabaseBackendAdapterV2.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
197
diff
changeset
|
93 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/DatabaseBackendAdapterV2.cpp |
212 | 94 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/DatabaseBackendAdapterV3.cpp |
0 | 95 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/IndexBackend.cpp |
1
d17b2631bb67
starting StorageBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
96 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/StorageBackend.cpp |
152 | 97 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Databases/DatabaseConstraint.cpp |
98 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp | |
99 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp | |
0 | 100 ) |