Mercurial > hg > orthanc-databases
annotate SQLite/CMakeLists.txt @ 126:de1dbd841e2b
back to mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 08 Feb 2019 18:43:02 +0100 |
parents | 5571a6554db0 |
children | 534759b0cf14 |
rev | line source |
---|---|
0 | 1 cmake_minimum_required(VERSION 2.8) |
2 project(OrthancSQLite) | |
3 | |
4 set(ORTHANC_PLUGIN_VERSION "mainline") | |
5 | |
6 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline") | |
7 set(ORTHANC_FRAMEWORK_VERSION "mainline") | |
8 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") | |
9 else() | |
27
173176f8cef2
jobs branch has disappeared in orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
24
diff
changeset
|
10 set(ORTHANC_FRAMEWORK_VERSION "1.4.0") |
0 | 11 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") |
12 endif() | |
13 | |
14 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake) | |
15 | |
16 set(ENABLE_SQLITE_BACKEND ON) | |
17 | |
18 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) | |
19 | |
20 EmbedResources( | |
21 SQLITE_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql | |
22 ) | |
23 | |
24 add_library(OrthancSQLiteIndex SHARED | |
24
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
25 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp |
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
26 Plugins/IndexPlugin.cpp |
0 | 27 Plugins/SQLiteIndex.cpp |
24
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
28 |
0 | 29 ${DATABASES_SOURCES} |
30 ${AUTOGENERATED_SOURCES} | |
31 ) | |
32 | |
33 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") | |
34 | |
35 add_definitions( | |
36 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" | |
37 ) | |
38 | |
39 #set_target_properties(OrthancSQLiteStorage PROPERTIES | |
40 # VERSION ${ORTHANC_PLUGIN_VERSION} | |
41 # SOVERSION ${ORTHANC_PLUGIN_VERSION} | |
42 # COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
43 # ) | |
44 | |
45 set_target_properties(OrthancSQLiteIndex PROPERTIES | |
46 VERSION ${ORTHANC_PLUGIN_VERSION} | |
47 SOVERSION ${ORTHANC_PLUGIN_VERSION} | |
48 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
49 ) | |
50 | |
51 install( | |
52 TARGETS OrthancSQLiteIndex # OrthancSQLiteStorage TODO | |
53 RUNTIME DESTINATION lib # Destination for Windows | |
54 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
55 ) | |
56 | |
57 add_executable(UnitTests | |
58 Plugins/SQLiteIndex.cpp | |
59 UnitTests/UnitTestsMain.cpp | |
60 ${DATABASES_SOURCES} | |
61 ${GOOGLE_TEST_SOURCES} | |
62 ${AUTOGENERATED_SOURCES} | |
63 ) | |
64 | |
65 target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES}) | |
66 set_target_properties(UnitTests PROPERTIES | |
67 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0 | |
68 ) |