提交 aa3f7fda 编写于 作者: W wangguibao

Fix protobuf.cmake for Cmake 3.9 and above

上级 797cbd6c
......@@ -125,11 +125,9 @@ 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
IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}")
endif()
endif()
FOREACH(dep ${protobuf_DEPS})
ADD_DEPENDENCIES(protobuf ${dep})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册