|
|
|
@ -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,14 +34,15 @@ 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) |
|
|
|
|
if(DEFINED ${PACKAGE_FIND_NAME}_${OPTION} AND |
|
|
|
|
NOT ${PACKAGE_FIND_NAME}_${OPTION} EQUAL VALUE) |
|
|
|
|
NOT ${PACKAGE_FIND_NAME}_${OPTION} STREQUAL ${VALUE}) |
|
|
|
|
set(PACKAGE_VERSION_UNSUITABLE TRUE) |
|
|
|
|
endif() |
|
|
|
|
set(${PACKAGE_FIND_NAME}_${OPTION} ${VALUE}) |
|
|
|
|
set(${PACKAGE_FIND_NAME}_${OPTION} ${VALUE} PARENT_SCOPE) |
|
|
|
|
endmacro() |
|
|
|
|
_check_and_save_build_option(WITH_ZLIB @protobuf_WITH_ZLIB@) |
|
|
|
|
_check_and_save_build_option(MSVC_STATIC_RUNTIME @protobuf_MSVC_STATIC_RUNTIME@) |
|
|
|
|