This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 33549357ae986be01a826a01464ff6fe1c7648db
Author: Gabor Gyimesi <[email protected]>
AuthorDate: Thu Apr 11 18:50:32 2024 +0200

    MINIFICPP-2327 Fix Loki protobuf code generation on Windows using msbuild
    
    Closes #1757
    
    Signed-off-by: Marton Szasz <[email protected]>
---
 cmake/Grpc.cmake | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/cmake/Grpc.cmake b/cmake/Grpc.cmake
index bdf3870a0..7c881bae7 100644
--- a/cmake/Grpc.cmake
+++ b/cmake/Grpc.cmake
@@ -42,10 +42,5 @@ add_dependencies(grpc++ OpenSSL::SSL OpenSSL::Crypto 
ZLIB::ZLIB)
 
 set(GRPC_INCLUDE_DIR "${grpc_SOURCE_DIR}/include" CACHE STRING "" FORCE)
 set(PROTOBUF_INCLUDE_DIR "${protobuf_SOURCE_DIR}/src" CACHE STRING "" FORCE)
-if (WIN32)
-  set(PROTOBUF_COMPILER "${protobuf_BINARY_DIR}/protoc.exe" CACHE STRING "" 
FORCE)
-  set(GRPC_CPP_PLUGIN "${grpc_BINARY_DIR}/grpc_cpp_plugin.exe" CACHE STRING "" 
FORCE)
-else()
-  set(PROTOBUF_COMPILER "${protobuf_BINARY_DIR}/protoc" CACHE STRING "" FORCE)
-  set(GRPC_CPP_PLUGIN "${grpc_BINARY_DIR}/grpc_cpp_plugin" CACHE STRING "" 
FORCE)
-endif()
+set(PROTOBUF_COMPILER "$<TARGET_FILE:protoc>" CACHE STRING "" FORCE)
+set(GRPC_CPP_PLUGIN "$<TARGET_FILE:grpc_cpp_plugin>" CACHE STRING "" FORCE)

Reply via email to