Mercurial > hg > orthanc-databases
annotate SQLite/CMakeLists.txt @ 66:e78d7077ee1c db-changes
preparing for db-changes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Dec 2018 17:19:17 +0100 |
parents | 173176f8cef2 |
children | 19764fc60ade |
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") | |
66
e78d7077ee1c
preparing for db-changes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
27
diff
changeset
|
9 set(ORTHANC_FRAMEWORK_BRANCH "db-changes") # TODO - Remove this once out of "db-changes" branch |
0 | 10 else() |
27
173176f8cef2
jobs branch has disappeared in orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
24
diff
changeset
|
11 set(ORTHANC_FRAMEWORK_VERSION "1.4.0") |
0 | 12 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") |
13 endif() | |
14 | |
15 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake) | |
16 | |
17 set(ENABLE_SQLITE_BACKEND ON) | |
18 | |
19 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) | |
20 | |
21 EmbedResources( | |
22 SQLITE_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql | |
23 ) | |
24 | |
25 add_library(OrthancSQLiteIndex SHARED | |
24
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
26 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp |
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
27 Plugins/IndexPlugin.cpp |
0 | 28 Plugins/SQLiteIndex.cpp |
24
17f849b2af34
sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
29 |
0 | 30 ${DATABASES_SOURCES} |
31 ${AUTOGENERATED_SOURCES} | |
32 ) | |
33 | |
34 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") | |
35 | |
36 add_definitions( | |
37 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" | |
38 -DHAS_ORTHANC_EXCEPTION=1 | |
39 ) | |
40 | |
41 #set_target_properties(OrthancSQLiteStorage PROPERTIES | |
42 # VERSION ${ORTHANC_PLUGIN_VERSION} | |
43 # SOVERSION ${ORTHANC_PLUGIN_VERSION} | |
44 # COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
45 # ) | |
46 | |
47 set_target_properties(OrthancSQLiteIndex PROPERTIES | |
48 VERSION ${ORTHANC_PLUGIN_VERSION} | |
49 SOVERSION ${ORTHANC_PLUGIN_VERSION} | |
50 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
51 ) | |
52 | |
53 install( | |
54 TARGETS OrthancSQLiteIndex # OrthancSQLiteStorage TODO | |
55 RUNTIME DESTINATION lib # Destination for Windows | |
56 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
57 ) | |
58 | |
59 add_executable(UnitTests | |
60 Plugins/SQLiteIndex.cpp | |
61 UnitTests/UnitTestsMain.cpp | |
62 ${DATABASES_SOURCES} | |
63 ${GOOGLE_TEST_SOURCES} | |
64 ${AUTOGENERATED_SOURCES} | |
65 ) | |
66 | |
67 target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES}) | |
68 set_target_properties(UnitTests PROPERTIES | |
69 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0 | |
70 ) |