changeset 5192:af66a8e93ccf db-protobuf

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 27 Mar 2023 10:04:08 +0200
parents fb96f1ffd020
children 1a878922404b
files OrthancFramework/Resources/CMake/ProtobufConfiguration.cmake OrthancFramework/Resources/ProtocolBuffers/CMakeLists.txt
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/ProtobufConfiguration.cmake	Mon Mar 27 09:02:36 2023 +0200
+++ b/OrthancFramework/Resources/CMake/ProtobufConfiguration.cmake	Mon Mar 27 10:04:08 2023 +0200
@@ -30,7 +30,6 @@
       CMAKE_ARGS
       -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
       -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}
-      INSTALL_COMMAND ""  # Skip the install step
       )
 
     # The "protoc" compiler is built using "externalproject_add",
@@ -41,8 +40,7 @@
       set(Suffix "")
     endif()
 
-    externalproject_get_property(ProtobufCompiler binary_dir)
-    set(PROTOC_EXECUTABLE ${binary_dir}/protoc${Suffix})
+    set(PROTOC_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/protoc${Suffix})
   endif()
 
   include(${CMAKE_CURRENT_LIST_DIR}/../ProtocolBuffers/ProtobufLibrary.cmake)  
--- a/OrthancFramework/Resources/ProtocolBuffers/CMakeLists.txt	Mon Mar 27 09:02:36 2023 +0200
+++ b/OrthancFramework/Resources/ProtocolBuffers/CMakeLists.txt	Mon Mar 27 10:04:08 2023 +0200
@@ -142,3 +142,8 @@
   ${PROTOBUF_LIBRARY_SOURCES}
   ${PROTOBUF_COMPILER_SOURCES}
   )
+
+install(
+  TARGETS protoc
+  RUNTIME DESTINATION .
+  )