Fix find module not working when no version number was given

pull/3157/head
Walter Gray 8 years ago
parent d6470abef1
commit ae85cb8ef3
  1. 2
      cmake/protobuf-config-version.cmake.in

@ -17,6 +17,7 @@ endif()
set(PACKAGE_VERSION_COMPATIBLE TRUE) #Assume true until shown otherwise set(PACKAGE_VERSION_COMPATIBLE TRUE) #Assume true until shown otherwise
if(PACKAGE_FIND_VERSION) #Only perform version checks if one is given
if(NOT PACKAGE_FIND_VERSION_MAJOR EQUAL "@protobuf_VERSION_MAJOR@") if(NOT PACKAGE_FIND_VERSION_MAJOR EQUAL "@protobuf_VERSION_MAJOR@")
set(PACKAGE_VERSION_COMPATIBLE FALSE) set(PACKAGE_VERSION_COMPATIBLE FALSE)
elseif(PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) elseif(PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
@ -33,6 +34,7 @@ elseif(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE) set(PACKAGE_VERSION_COMPATIBLE FALSE)
endif() endif()
endif() endif()
endif()
# Check and save build options used to create this package # Check and save build options used to create this package
macro(_check_and_save_build_option OPTION VALUE) macro(_check_and_save_build_option OPTION VALUE)

Loading…
Cancel
Save