comparison SQLite/CMakeLists.txt @ 372:b5e2c1e48828 db-protobuf

created branch db-protobuf to take advantage of OrthancPluginRegisterDatabaseBackendV4()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 Mar 2023 11:40:07 +0200
parents 16aac0287485
children 3d6886f3e5b3
comparison
equal deleted inserted replaced
371:c1fe28de1bf6 372:b5e2c1e48828
22 project(OrthancSQLite) 22 project(OrthancSQLite)
23 23
24 set(ORTHANC_PLUGIN_VERSION "mainline") 24 set(ORTHANC_PLUGIN_VERSION "mainline")
25 25
26 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) 26 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1)
27 set(ORTHANC_OPTIMAL_VERSION_MINOR 9) 27 set(ORTHANC_OPTIMAL_VERSION_MINOR 12)
28 set(ORTHANC_OPTIMAL_VERSION_REVISION 2) 28 set(ORTHANC_OPTIMAL_VERSION_REVISION 0)
29 29
30 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline") 30 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
31 set(ORTHANC_FRAMEWORK_VERSION "mainline") 31 set(ORTHANC_FRAMEWORK_VERSION "mainline")
32 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") 32 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
33 else() 33 else()
34 set(ORTHANC_FRAMEWORK_VERSION "1.9.6") 34 set(ORTHANC_FRAMEWORK_VERSION "1.12.0")
35 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") 35 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
36 endif() 36 endif()
37 37
38 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake) 38 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake)
39 39
42 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) 42 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake)
43 43
44 EmbedResources( 44 EmbedResources(
45 SQLITE_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql 45 SQLITE_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql
46 ) 46 )
47
48 if (EXISTS ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto)
49 add_custom_command(
50 COMMAND
51 ${PROTOC_EXECUTABLE} ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto --cpp_out=${AUTOGENERATED_DIR} -I${ORTHANC_SDK_ROOT}/orthanc/
52 DEPENDS
53 ProtobufCompiler
54 ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto
55 OUTPUT
56 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc
57 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.h
58 )
59
60 list(APPEND AUTOGENERATED_SOURCES
61 ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc
62 )
63 endif()
47 64
48 add_custom_target( 65 add_custom_target(
49 AutogeneratedTarget 66 AutogeneratedTarget
50 DEPENDS 67 DEPENDS
51 ${AUTOGENERATED_SOURCES} 68 ${AUTOGENERATED_SOURCES}