diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 994ba14cfa0044ee0d87d5c9ede4bd32fbe0e4f4..b61833e2687b3cd1ab420b5b4c96348b347b711a 100644 --- a/cmake/external/protobuf.cmake +++ b/cmake/external/protobuf.cmake @@ -75,6 +75,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) LIST(APPEND external_project_dependencies ${TARGET_NAME} PARENT_SCOPE) ENDFUNCTION() +SET(PROTOBUF_VERSION 3.1) IF(NOT CMAKE_CROSSCOMPILING) FIND_PACKAGE(Protobuf ${PROTOBUF_VERSION}) @@ -91,7 +92,6 @@ ELSE() CACHE FILEPATH "protobuf executable." FORCE) ENDIF() -SET(PROTOBUF_VERSION 3.1) IF(NOT PROTOBUF_FOUND) build_protobuf(protobuf FALSE) SET(PROTOBUF_INCLUDE_DIR ${protobuf_INCLUDE_DIR}