Skip to content

Commit

Permalink
Open up Protofuf 3 build for WIN32
Browse files Browse the repository at this point in the history
  • Loading branch information
dstoup committed Oct 30, 2019
1 parent d8801bd commit 80fcb9e
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions CMake/fletch-tarballs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -490,25 +490,22 @@ if(NOT WIN32)
endif()

# Protobuf
if(NOT WIN32)
if (fletch_ENABLE_Protobuf OR fletch_ENABLE_ALL_PACKAGES OR AUTO_ENABLE_CAFFE_DEPENDENCY)
set(Protobuf_SELECT_VERSION "3.9.0" CACHE STRING "Select the version of ProtoBuf to build.")
set_property(CACHE Protobuf_SELECT_VERSION PROPERTY STRINGS "2.5.0" "3.9.0")
endif()

set(Protobuf_version ${Protobuf_SELECT_VERSION})
# WIN32 only supports the CMake version, 3.9.0
if (WIN32)
set(Protobuf_SELECT_VERSION "3.9.0" CACHE STRING "Select the version of ProtoBuf to build.")
else()
set(Protobuf_SELECT_VERSION "3.9.0" CACHE STRING "Select the version of ProtoBuf to build.")
set_property(CACHE Protobuf_SELECT_VERSION PROPERTY STRINGS "2.5.0" "3.9.0")
endif()

if (Protobuf_version VERSION_EQUAL 2.5.0)
set(Protobuf_url "https://github.com/google/protobuf/releases/download/v${Protobuf_version}/protobuf-${Protobuf_version}.tar.bz2" )
set(Protobuf_md5 "a72001a9067a4c2c4e0e836d0f92ece4" )
elseif (Protobuf_version VERSION_EQUAL 3.9.0)
set(Protobuf_url "https://github.com/protocolbuffers/protobuf/releases/download/v${Protobuf_version}/protobuf-all-${Protobuf_version}.zip")
set(Protobuf_md5 "4f042c8b46823a69db3dcbc7381b73f4" )
elseif(Protobuf_version)
message(ERROR "Protobuf Version ${Protobuf_version} Not Supported")
endif()
list(APPEND fletch_external_sources Protobuf )
if (Protobuf_SELECT_VERSION VERSION_EQUAL 2.5.0)
set(Protobuf_url "https://github.com/google/protobuf/releases/download/v${Protobuf_SELECT_VERSION}/protobuf-${Protobuf_SELECT_VERSION}.tar.bz2" )
set(Protobuf_md5 "a72001a9067a4c2c4e0e836d0f92ece4" )
elseif (Protobuf_SELECT_VERSION VERSION_EQUAL 3.9.0)
set(Protobuf_url "https://github.com/protocolbuffers/protobuf/releases/download/v${Protobuf_SELECT_VERSION}/protobuf-all-${Protobuf_SELECT_VERSION}.zip")
set(Protobuf_md5 "4f042c8b46823a69db3dcbc7381b73f4" )
endif()
list(APPEND fletch_external_sources Protobuf )

# Caffe
set(InternalCaffe True)
Expand Down

0 comments on commit 80fcb9e

Please sign in to comment.