提交 463f0ed6 编写于 作者: W wangguibao

Fix protobuf.cmake for Cmake 3.9 and above

上级 09bf6078
......@@ -125,10 +125,8 @@ macro(PROMPT_PROTOBUF_LIB)
# For CMake 3.9 and above
if(NOT TARGET protobuf::protoc)
add_executable(protobuf::protoc IMPORTED)
if(EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
set_target_properties(protobuf::protoc PROPERTIES
set_target_properties(protobuf::protoc PROPERTIES
IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}")
endif()
endif()
FOREACH(dep ${protobuf_DEPS})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册