@@ -490,25 +490,22 @@ if(NOT WIN32)
490490endif ()
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" )
511507endif ()
508+ list (APPEND fletch_external_sources Protobuf )
512509
513510# Caffe
514511set (InternalCaffe True )
0 commit comments