提交 b55bde1b 编写于 作者: L Liu Yiqun

Fix bug of setting external_project_dependencies in cmake.

上级 668a1b8b
......@@ -71,8 +71,6 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
${OPTIONAL_CACHE_ARGS}
)
LIST(APPEND external_project_dependencies ${TARGET_NAME} PARENT_SCOPE)
ENDFUNCTION()
SET(PROTOBUF_VERSION 3.1)
......@@ -88,12 +86,16 @@ IF(NOT CMAKE_CROSSCOMPILING)
ENDIF(PROTOBUF_FOUND)
ELSE()
build_protobuf(protobuf_host TRUE)
LIST(APPEND external_project_dependencies protobuf_host)
SET(PROTOBUF_PROTOC_EXECUTABLE ${protobuf_host_PROTOC_EXECUTABLE}
CACHE FILEPATH "protobuf executable." FORCE)
ENDIF()
IF(NOT PROTOBUF_FOUND)
build_protobuf(protobuf FALSE)
LIST(APPEND external_project_dependencies protobuf)
SET(PROTOBUF_INCLUDE_DIR ${protobuf_INCLUDE_DIR}
CACHE PATH "protobuf include directory." FORCE)
IF(NOT CMAKE_CROSSCOMPILING)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册