Mercurial > hg > orthanc-databases
comparison SQLite/CMakeLists.txt @ 0:7cea966b6829
initial commit
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 04 Jul 2018 08:16:29 +0200 |
parents | |
children | 17f849b2af34 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7cea966b6829 |
---|---|
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 set(ORTHANC_FRAMEWORK_BRANCH "jobs") # TODO remove this | |
10 else() | |
11 set(ORTHANC_FRAMEWORK_VERSION "1.3.2") | |
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 | |
26 Plugins/SQLiteIndex.cpp | |
27 Plugins/IndexPlugin.cpp | |
28 ${DATABASES_SOURCES} | |
29 ${AUTOGENERATED_SOURCES} | |
30 ) | |
31 | |
32 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") | |
33 | |
34 add_definitions( | |
35 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" | |
36 -DHAS_ORTHANC_EXCEPTION=1 | |
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 ) |