Fix find module not working when no version number was given
This commit is contained in:
parent
d6470abef1
commit
ae85cb8ef3
@ -17,6 +17,7 @@ endif()
|
||||
|
||||
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@")
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
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)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check and save build options used to create this package
|
||||
macro(_check_and_save_build_option OPTION VALUE)
|
||||
|
Loading…
Reference in New Issue
Block a user