We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60fcae0 commit e8cc656Copy full SHA for e8cc656
cpp/CMakeLists.txt
@@ -358,10 +358,9 @@ set(PROTO_HDRS "${CMAKE_CURRENT_BINARY_DIR}/cuopt_remote.pb.h")
358
359
# Find protoc compiler (provided by config package or target)
360
if(TARGET protobuf::protoc)
361
- get_target_property(_PROTOBUF_PROTOC protobuf::protoc IMPORTED_LOCATION_RELEASE)
362
- if(NOT _PROTOBUF_PROTOC)
363
- get_target_property(_PROTOBUF_PROTOC protobuf::protoc IMPORTED_LOCATION)
364
- endif()
+ set(_PROTOBUF_PROTOC "$<TARGET_FILE:protobuf::protoc>")
+elseif(TARGET Protobuf::protoc)
+ set(_PROTOBUF_PROTOC "$<TARGET_FILE:Protobuf::protoc>")
365
else()
366
set(_PROTOBUF_PROTOC ${Protobuf_PROTOC_EXECUTABLE})
367
endif()
0 commit comments