Skip to content

Commit 6627ea5

Browse files
committed
preffer Protobuf_PROTOC_EXECUTABLE
1 parent 96089d5 commit 6627ea5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/SetupProtobuf.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ if(NOT USERVER_FORCE_DOWNLOAD_PROTOBUF)
6060

6161
if(Protobuf_FOUND)
6262
_userver_set_protobuf_version_category()
63-
if (TARGET protobuf::protoc)
64-
set(PROTOBUF_PROTOC $<TARGET_FILE:protobuf::protoc>)
65-
else()
63+
if (Protobuf_PROTOC_EXECUTABLE)
6664
set(PROTOBUF_PROTOC "${Protobuf_PROTOC_EXECUTABLE}")
65+
elseif (TARGET protobuf::protoc)
66+
set(PROTOBUF_PROTOC $<TARGET_FILE:protobuf::protoc>)
6767
endif()
6868
return()
6969
endif()

0 commit comments

Comments
 (0)