Mercurial > hg > orthanc-databases
annotate Resources/CMake/DatabasesPluginConfiguration.cmake @ 334:75ff5ce4a995
fix odbc build for OSX
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 11 Aug 2021 08:28:43 +0200 |
parents | a116dbdf9118 |
children | 16aac0287485 cd9521e04249 |
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 | |
193
3236894320d6
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
156
diff
changeset
|
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium |
0 | 5 # |
6 # This program is free software: you can redistribute it and/or | |
7 # modify it under the terms of the GNU Affero General Public License | |
8 # as published by the Free Software Foundation, either version 3 of | |
9 # the License, or (at your option) any later version. | |
10 # | |
11 # This program is distributed in the hope that it will be useful, but | |
12 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 # Affero General Public License for more details. | |
15 # | |
16 # You should have received a copy of the GNU Affero General Public License | |
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | |
19 | |
20 | |
300
a116dbdf9118
replaced CMAKE_SOURCE_DIR by CMAKE_CURRENT_LIST_DIR in CMake scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
272
diff
changeset
|
21 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
|
22 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
|
23 include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/Plugins/OrthancPluginsExports.cmake) |
0 | 24 |
25 | |
26 if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) | |
27 if (ORTHANC_SDK_VERSION STREQUAL "0.9.5") | |
28 include_directories(${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") |
c0cb5d2cd696
checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1
diff
changeset
|
30 include_directories(${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") |
badc89b06477
upgrading orthanc sdk from 1.4.0 to 1.5.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
69
diff
changeset
|
32 include_directories(${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") |
121ab36c87bd
updating to Orthanc SDK 1.5.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
94
diff
changeset
|
34 include_directories(${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") |
c7dc70a0a477
upgrade to Orthanc SDK 1.9.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
237
diff
changeset
|
36 include_directories(${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-1.9.2) |
197
a57ca58c538a
CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
194
diff
changeset
|
37 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
|
38 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
|
39 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
|
40 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
|
41 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
|
42 endif() |
a57ca58c538a
CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
194
diff
changeset
|
43 include_directories(${tmp}) |
0 | 44 else() |
45 message(FATAL_ERROR "Unsupported version of the Orthanc plugin SDK: ${ORTHANC_SDK_VERSION}") | |
46 endif() | |
47 else () | |
46
6a574d810b98
Compatibility with MySQL 8.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
48 CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCDatabasePlugin.h HAVE_ORTHANC_H) |
0 | 49 if (NOT HAVE_ORTHANC_H) |
50 message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK") | |
51 endif() | |
52 endif() | |
53 | |
54 | |
129
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
diff
changeset
|
55 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
|
56 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
|
57 endif() |
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
diff
changeset
|
58 |
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
diff
changeset
|
59 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
|
60 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
|
61 endif() |
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
diff
changeset
|
62 |
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
diff
changeset
|
63 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
|
64 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
|
65 endif() |
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
diff
changeset
|
66 |
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
diff
changeset
|
67 |
69
19764fc60ade
compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
68
diff
changeset
|
68 add_definitions( |
19764fc60ade
compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
68
diff
changeset
|
69 -DHAS_ORTHANC_EXCEPTION=1 |
152 | 70 -DORTHANC_BUILDING_SERVER_LIBRARY=0 |
69
19764fc60ade
compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
68
diff
changeset
|
71 -DORTHANC_ENABLE_PLUGINS=1 |
129
534759b0cf14
use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
123
diff
changeset
|
72 -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
|
73 -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
|
74 -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
|
75 ) |
19764fc60ade
compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
68
diff
changeset
|
76 |
19764fc60ade
compatibility with Orthanc SDDK 0.9.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
68
diff
changeset
|
77 |
0 | 78 list(APPEND DATABASES_SOURCES |
79 ${ORTHANC_CORE_SOURCES} | |
205
873e37048f96
renaming OrthancCppDatabasePlugin.h as DatabaseBackendAdapterV2.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
197
diff
changeset
|
80 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/DatabaseBackendAdapterV2.cpp |
212 | 81 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/DatabaseBackendAdapterV3.cpp |
0 | 82 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/IndexBackend.cpp |
1
d17b2631bb67
starting StorageBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
83 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/StorageBackend.cpp |
152 | 84 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Databases/DatabaseConstraint.cpp |
85 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp | |
86 ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp | |
0 | 87 ) |