@ -1,28 +1,32 @@
# T h i s i s a b a s i c v e r s i o n f i l e f o r t h e C o n f i g - m o d e o f find_package ( ) .
# I t i s d e r i v e d f r o m t h e f o r m a t s u g g e s t e d i n t h e C M a k e m o d u l e
# C M a k e P a c k a g e C o n f i g H e l p e r s . i n t r o d u c e d i n C M a k e 2 . 8 . 8 .
# I f t h e c m a k e _ m i n i m u m _ r e q u i r e d v e r s i o n i s e v e r b u m p e d t o 2 . 8 . 8 o r
# a b o v e , t h i s f i l e m a y b e d e l e t e d a n d r e p l a c e d w i t h a c a l l t o
# write_basic_package_version_file ( ... )
set ( PACKAGE_VERSION "@protobuf_VERSION@" )
set ( PACKAGE_VERSION @protobuf_VERSION@ )
if ( PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION )
set ( PACKAGE_VERSION_EXACT TRUE )
endif ( )
if ( PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION )
set ( PACKAGE_VERSION_COMPATIBLE FALSE )
else ( )
set ( PACKAGE_VERSION_COMPATIBLE TRUE ) # A s s u m e t r u e u n t i l s h o w n o t h e r w i s e
if ( PACKAGE_FIND_VERSION_MAJOR STREQUAL @protobuf_VERSION_MAJOR@ )
set ( PACKAGE_VERSION_COMPATIBLE TRUE )
else ( )
# H a n d l e p r e r e l e a s e v e r s i o n s
set ( PACKAGE_FIND_VERSION_PRERELEASE "${${PACKAGE_FIND_NAME}_FIND_VERSION_PRERELEASE}" )
if ( NOT "@protobuf_VERSION_PRERELEASE@" STREQUAL "" )
if ( NOT ${ PACKAGE_FIND_NAME } _FIND_VERSION_PRERELEASE )
set ( PACKAGE_VERSION_COMPATIBLE FALSE )
message ( AUTHOR_WARNING "To use this prerelease version of ${PACKAGE_FIND_NAME}, set ${PACKAGE_FIND_NAME}_FIND_VERSION_PRERELEASE to '@protobuf_VERSION_PRERELEASE@'." )
endif ( )
if ( PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION )
set ( PACKAGE_VERSION_EXACT TRUE )
if ( NOT "${PACKAGE_FIND_VERSION}-${PACKAGE_FIND_VERSION_PRERELEASE}" STREQUAL "${PACKAGE_VERSION}" )
set ( PACKAGE_VERSION_COMPATIBLE FALSE )
else ( )
set ( PACKAGE_VERSION_EXACT TRUE )
endif ( )
else ( )
if ( NOT PACKAGE_FIND_VERSION_MAJOR EQUAL "@protobuf_VERSION_MAJOR@" )
set ( PACKAGE_VERSION_COMPATIBLE FALSE )
elseif ( PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION )
set ( PACKAGE_VERSION_COMPATIBLE FALSE )
endif ( )
endif ( )
# i f t h e i n s t a l l e d o r t h e u s i n g p r o j e c t d o n ' t h a v e C M A K E _ S I Z E O F _ V O I D _ P s e t , i g n o r e i t :
if ( "${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "" )
return ( )
@ -34,3 +38,5 @@ if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
set ( PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)" )
set ( PACKAGE_VERSION_UNSUITABLE TRUE )
endif ( )
set ( ${ PACKAGE_FIND_NAME } _VERSION_PRERELEASE "@protobuf_VERSION_PRERELEASE@" PARENT_SCOPE )