cmake_minimum_required(VERSION 3.5)

# simplify variable expansion
cmake_policy(SET CMP0053 NEW)
cmake_policy(SET CMP0010 NEW)

project(protobuf-download NONE)

include(ExternalProject)
ExternalProject_Add(protobuf_project
	GIT_REPOSITORY https://github.com/google/protobuf
	GIT_TAG "v3.5.1"
	SOURCE_DIR "${CMAKE_BINARY_DIR}/protobuf-src"
	BINARY_DIR "${CMAKE_BINARY_DIR}/protobuf-build"
	UPDATE_COMMAND ""
	PATCH_COMMAND git apply "${PROJECT_SOURCE_DIR}/3rdparty/glop/protobuf.patch"
	CONFIGURE_COMMAND ""
	BUILD_COMMAND ""
	INSTALL_COMMAND ""
	TEST_COMMAND ""
	LOG_DOWNLOAD ON
)
