Mercurial > hg > orthanc
annotate OrthancServer/Resources/Graveyard/DatabasePluginSample/CMakeLists.txt @ 5141:023569e7155b
moved DicomModification thread safety into ResourceModificationJob (trying to avoid mutex in OrthancFramework as much as possible)
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 20 Jan 2023 18:10:42 +0100 |
parents | cd363608551a |
children |
rev | line source |
---|---|
1671 | 1 cmake_minimum_required(VERSION 2.8) |
2 | |
3 project(SampleDatabasePlugin) | |
4 | |
5 # Parameters of the build | |
6 SET(SAMPLE_DATABASE_VERSION "0.0" CACHE STRING "Version of the plugin") | |
7 SET(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)") | |
8 SET(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages") | |
9 SET(STANDALONE_BUILD ON) | |
10 | |
11 # Advanced parameters to fine-tune linking against system libraries | |
12 SET(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of Boost") | |
13 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp") | |
14 SET(USE_SYSTEM_SQLITE ON CACHE BOOL "Use the system version of SQLite") | |
15 | |
4050 | 16 include(${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/Common/OrthancPlugins.cmake) |
1671 | 17 |
4050 | 18 include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake) |
19 set(ENABLE_SQLITE ON) | |
20 include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake) | |
1671 | 21 |
22 EmbedResources( | |
23 --system-exception # Use "std::runtime_error" instead of "OrthancException" for embedded resources | |
4050 | 24 PREPARE_DATABASE ${CMAKE_SOURCE_DIR}/../../../Sources/Database/PrepareDatabase.sql |
1671 | 25 ) |
26 | |
27 message("Setting the version of the plugin to ${SAMPLE_DATABASE_VERSION}") | |
28 | |
29 add_definitions( | |
30 -DORTHANC_SQLITE_STANDALONE=1 | |
2136
dd609a99d39a
uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1761
diff
changeset
|
31 -DORTHANC_ENABLE_PLUGINS=1 |
2144 | 32 -DORTHANC_SANDBOXED=0 |
1671 | 33 -DSAMPLE_DATABASE_VERSION="${SAMPLE_DATABASE_VERSION}" |
34 ) | |
35 | |
36 add_library(SampleDatabase SHARED | |
4050 | 37 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/DicomFormat/DicomArray.cpp |
38 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp | |
39 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/DicomFormat/DicomTag.cpp | |
40 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/DicomFormat/DicomValue.cpp | |
41 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Enumerations.cpp | |
42 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/Connection.cpp | |
43 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/FunctionContext.cpp | |
44 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/Statement.cpp | |
45 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/StatementId.cpp | |
46 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/StatementReference.cpp | |
47 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/Transaction.cpp | |
48 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Toolbox.cpp | |
49 ${CMAKE_SOURCE_DIR}/../../../Plugins/Engine/PluginsEnumerations.cpp | |
50 | |
51 Database.cpp | |
52 Plugin.cpp | |
53 DatabaseWrapperBase.cpp | |
54 | |
1671 | 55 ${BOOST_SOURCES} |
56 ${JSONCPP_SOURCES} | |
57 ${SQLITE_SOURCES} | |
58 ${AUTOGENERATED_SOURCES} | |
59 ) | |
60 | |
61 set_target_properties(SampleDatabase PROPERTIES | |
62 VERSION ${SAMPLE_DATABASE_VERSION} | |
63 SOVERSION ${SAMPLE_DATABASE_VERSION}) | |
64 | |
65 install( | |
66 TARGETS SampleDatabase | |
67 RUNTIME DESTINATION lib # Destination for Windows | |
68 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
69 ) |