# FIND_PACKAGE_VERSION_CHECK(NAME (DEFAULT_MSG|"Custom failure message"))
#    This function is intended to be used in FindXXX.cmake modules files.
#    It handles NAME_FIND_VERSION and NAME_VERSION variables in a Module.
#
#    Example:
#    find_package(LibSSH 0.3.2)
#
#    # check for the version and set it
#    set(LibSSH_VERSION 0.3.0)
#    find_package_version_check(LibSSH DEFAULT_MSG)
#
#
# Copyright (c) 2009 Andreas Schneider <mail@cynapses.org>
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
#
#  1. Redistributions of source code must retain the copyright
#     notice, this list of conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#  3. The name of the author may not be used to endorse or promote products
#     derived from this software without specific prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
#  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
#  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
#  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
#  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

function(FIND_PACKAGE_VERSION_CHECK _NAME _FAIL_MSG)
  string(TOUPPER ${_NAME} _NAME_UPPER)
  set(_AGE "old")

  if(${_NAME}_FIND_VERSION_EXACT)
    if(${_NAME}_FIND_VERSION VERSION_EQUAL ${_NAME}_VERSION)
      # exact version found
      set(${_NAME_UPPER}_FOUND TRUE)
    else()
      # exect version not found
      set(${_NAME_UPPER}_FOUND FALSE)
      # check if newer or older
      if(${_NAME}_FIND_VERSION VERSION_LESS ${_NAME}_VERSION)
        set(_AGE "new")
      else()
        set(_AGE "old")
      endif()
    endif()
  else()
    if(${_NAME}_FIND_VERSION)
      if(${_NAME}_VERSION VERSION_LESS ${_NAME}_FIND_VERSION)
        set(${_NAME_UPPER}_FOUND FALSE)
        set(_AGE "old")
      else()
        set(${_NAME_UPPER}_FOUND TRUE)
      endif()
    endif()
  endif()

  if("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
    if(${_NAME}_FIND_VERSION_EXACT)
      set(_FAIL_MESSAGE "The installed ${_NAME} version ${${_NAME}_VERSION} is too ${_AGE}, version ${${_NAME}_FIND_VERSION} is required.")
    else()
      set(_FAIL_MESSAGE "The installed ${_NAME} version ${${_NAME}_VERSION} is too ${_AGE}, at least version ${${_NAME}_FIND_VERSION} is required.")
    endif()
  else()
    set(_FAIL_MESSAGE "${_FAIL_MSG}")
  endif()

  if(NOT ${_NAME_UPPER}_FOUND)
    if(${_NAME}_FIND_REQUIRED)
      message(FATAL_ERROR "${_FAIL_MESSAGE}")
    else()
      if(NOT ${_NAME}_FIND_QUIETLY)
        message(STATUS "${_FAIL_MESSAGE}")
      endif()
    endif()
  endif()

  set(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
endfunction()
