Skip to content

Commit 80fcb9e

Browse files
committed
Open up Protofuf 3 build for WIN32
1 parent d8801bd commit 80fcb9e

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

CMake/fletch-tarballs.cmake

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -490,25 +490,22 @@ if(NOT WIN32)
490490
endif()
491491

492492
# Protobuf
493-
if(NOT WIN32)
494-
if (fletch_ENABLE_Protobuf OR fletch_ENABLE_ALL_PACKAGES OR AUTO_ENABLE_CAFFE_DEPENDENCY)
495-
set(Protobuf_SELECT_VERSION "3.9.0" CACHE STRING "Select the version of ProtoBuf to build.")
496-
set_property(CACHE Protobuf_SELECT_VERSION PROPERTY STRINGS "2.5.0" "3.9.0")
497-
endif()
498-
499-
set(Protobuf_version ${Protobuf_SELECT_VERSION})
493+
# WIN32 only supports the CMake version, 3.9.0
494+
if (WIN32)
495+
set(Protobuf_SELECT_VERSION "3.9.0" CACHE STRING "Select the version of ProtoBuf to build.")
496+
else()
497+
set(Protobuf_SELECT_VERSION "3.9.0" CACHE STRING "Select the version of ProtoBuf to build.")
498+
set_property(CACHE Protobuf_SELECT_VERSION PROPERTY STRINGS "2.5.0" "3.9.0")
499+
endif()
500500

501-
if (Protobuf_version VERSION_EQUAL 2.5.0)
502-
set(Protobuf_url "https://github.com/google/protobuf/releases/download/v${Protobuf_version}/protobuf-${Protobuf_version}.tar.bz2" )
503-
set(Protobuf_md5 "a72001a9067a4c2c4e0e836d0f92ece4" )
504-
elseif (Protobuf_version VERSION_EQUAL 3.9.0)
505-
set(Protobuf_url "https://github.com/protocolbuffers/protobuf/releases/download/v${Protobuf_version}/protobuf-all-${Protobuf_version}.zip")
506-
set(Protobuf_md5 "4f042c8b46823a69db3dcbc7381b73f4" )
507-
elseif(Protobuf_version)
508-
message(ERROR "Protobuf Version ${Protobuf_version} Not Supported")
509-
endif()
510-
list(APPEND fletch_external_sources Protobuf )
501+
if (Protobuf_SELECT_VERSION VERSION_EQUAL 2.5.0)
502+
set(Protobuf_url "https://github.com/google/protobuf/releases/download/v${Protobuf_SELECT_VERSION}/protobuf-${Protobuf_SELECT_VERSION}.tar.bz2" )
503+
set(Protobuf_md5 "a72001a9067a4c2c4e0e836d0f92ece4" )
504+
elseif (Protobuf_SELECT_VERSION VERSION_EQUAL 3.9.0)
505+
set(Protobuf_url "https://github.com/protocolbuffers/protobuf/releases/download/v${Protobuf_SELECT_VERSION}/protobuf-all-${Protobuf_SELECT_VERSION}.zip")
506+
set(Protobuf_md5 "4f042c8b46823a69db3dcbc7381b73f4" )
511507
endif()
508+
list(APPEND fletch_external_sources Protobuf )
512509

513510
# Caffe
514511
set(InternalCaffe True)

0 commit comments

Comments
 (0)