diff PostgreSQL/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
line wrap: on
line diff
--- a/PostgreSQL/CMakeLists.txt	Tue Mar 14 09:08:45 2023 +0100
+++ b/PostgreSQL/CMakeLists.txt	Tue Mar 28 11:40:07 2023 +0200
@@ -24,14 +24,14 @@
 set(ORTHANC_PLUGIN_VERSION "mainline")
 
 set(ORTHANC_OPTIMAL_VERSION_MAJOR    1)
-set(ORTHANC_OPTIMAL_VERSION_MINOR    9)
-set(ORTHANC_OPTIMAL_VERSION_REVISION 2)
+set(ORTHANC_OPTIMAL_VERSION_MINOR    12)
+set(ORTHANC_OPTIMAL_VERSION_REVISION 0)
 
 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
   set(ORTHANC_FRAMEWORK_VERSION "mainline")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
 else()
-  set(ORTHANC_FRAMEWORK_VERSION "1.9.6")
+  set(ORTHANC_FRAMEWORK_VERSION "1.12.0")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
 endif()
 
@@ -84,6 +84,25 @@
   POSTGRESQL_GET_LAST_CHANGE_INDEX  ${CMAKE_SOURCE_DIR}/Plugins/GetLastChangeIndex.sql
   )
 
+
+if (EXISTS ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto)
+  add_custom_command(
+    COMMAND
+    ${PROTOC_EXECUTABLE} ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto --cpp_out=${AUTOGENERATED_DIR} -I${ORTHANC_SDK_ROOT}/orthanc/
+    DEPENDS
+    ProtobufCompiler
+    ${ORTHANC_SDK_ROOT}/orthanc/OrthancDatabasePlugin.proto
+    OUTPUT
+    ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc
+    ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.h
+    )
+
+  list(APPEND AUTOGENERATED_SOURCES
+    ${AUTOGENERATED_DIR}/OrthancDatabasePlugin.pb.cc
+    )
+endif()
+
+
 add_custom_target(
   AutogeneratedTarget
   DEPENDS