# MYGUI CMake package file
# - check if package version satisfies requested version

set(PACKAGE_VERSION @MYGUI_VERSION@)
set(PACKAGE_VERSION_MAJOR @MYGUI_VERSION_MAJOR@)
set(PACKAGE_VERSION_MINOR @MYGUI_VERSION_MINOR@)
set(PACKAGE_VERSION_EXACT FALSE)
set(PACKAGE_VERSION_COMPATIBLE FALSE)

if(${PACKAGE_VERSION} VERSION_EQUAL ${PACKAGE_FIND_VERSION})
	set(PACKAGE_VERSION_EXACT TRUE)
	set(PACKAGE_VERSION_COMPATIBLE TRUE)
elseif(${PACKAGE_VERSION} VERSION_GREATER ${PACKAGE_FIND_VERSION})
  # compatibility is only guaranteed if major and minor version numbers match
  if (PACKAGE_FIND_VERSION_MAJOR EQUAL ${PACKAGE_VERSION_MAJOR} AND
      PACKAGE_FIND_VERSION_MINOR EQUAL ${PACKAGE_VERSION_MINOR})
    set(PACKAGE_VERSION_COMPATIBLE TRUE)
  endif (PACKAGE_FIND_VERSION_MAJOR EQUAL ${PACKAGE_VERSION_MAJOR} AND
      PACKAGE_FIND_VERSION_MINOR EQUAL ${PACKAGE_VERSION_MINOR})
endif(${PACKAGE_VERSION} VERSION_EQUAL ${PACKAGE_FIND_VERSION})
