Mercurial > hg > orthanc-databases
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SQLite/CMakeLists.txt Wed Jul 04 08:16:29 2018 +0200 @@ -0,0 +1,68 @@ +cmake_minimum_required(VERSION 2.8) +project(OrthancSQLite) + +set(ORTHANC_PLUGIN_VERSION "mainline") + +if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline") + set(ORTHANC_FRAMEWORK_VERSION "mainline") + set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") + set(ORTHANC_FRAMEWORK_BRANCH "jobs") # TODO remove this +else() + set(ORTHANC_FRAMEWORK_VERSION "1.3.2") + set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") +endif() + +include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake) + +set(ENABLE_SQLITE_BACKEND ON) + +include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) + +EmbedResources( + SQLITE_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql + ) + +add_library(OrthancSQLiteIndex SHARED + Plugins/SQLiteIndex.cpp + Plugins/IndexPlugin.cpp + ${DATABASES_SOURCES} + ${AUTOGENERATED_SOURCES} + ) + +message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") + +add_definitions( + -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" + -DHAS_ORTHANC_EXCEPTION=1 + ) + +#set_target_properties(OrthancSQLiteStorage PROPERTIES +# VERSION ${ORTHANC_PLUGIN_VERSION} +# SOVERSION ${ORTHANC_PLUGIN_VERSION} +# COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 +# ) + +set_target_properties(OrthancSQLiteIndex PROPERTIES + VERSION ${ORTHANC_PLUGIN_VERSION} + SOVERSION ${ORTHANC_PLUGIN_VERSION} + COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 + ) + +install( + TARGETS OrthancSQLiteIndex # OrthancSQLiteStorage TODO + RUNTIME DESTINATION lib # Destination for Windows + LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux + ) + +add_executable(UnitTests + Plugins/SQLiteIndex.cpp + UnitTests/UnitTestsMain.cpp + ${DATABASES_SOURCES} + ${GOOGLE_TEST_SOURCES} + ${AUTOGENERATED_SOURCES} + ) + +target_link_libraries(UnitTests ${GOOGLE_TEST_LIBRARIES}) +set_target_properties(UnitTests PROPERTIES + COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0 + )