# - Try to find Qt5Pas
# Once done this will define
#
#  Qt5PAS_FOUND - System has Qt5Pas
#  QT4PAS_INCLUDE_DIR - Set if system has extra qt5.pas file
#
# Copyright (c) 2010, Matthias Klumpp, <matthias@nlinux.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if ( QT5PAS_LIBRARY )
   # in cache already
   SET(Qt5Pas_FIND_QUIETLY TRUE)
endif ( QT5PAS_LIBRARY )

FIND_PATH(QT5PAS_INCLUDE_DIR qt5.pas /usr/share/pascal/qt5 /usr/local/share/pascal/qt5)

FIND_LIBRARY(QT5PAS_LIBRARY NAMES Qt5Pas PATH /usr/lib /usr/local/lib /usr/lib64)

IF (QT5PAS_LIBRARY)
   SET(QT5PAS_FOUND TRUE)
ENDIF (QT5PAS_LIBRARY)


IF (QT5PAS_FOUND)
   IF (NOT Qt5Pas_FIND_QUIETLY)
      MESSAGE(STATUS "Found Qt5Pas: ${QT5PAS_LIBRARY}")
   ENDIF (NOT Qt5Pas_FIND_QUIETLY)
ELSE (QT5PAS_FOUND)
   IF (Qt5Pas_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find Qt5Pas")
   ENDIF (Qt5Pas_FIND_REQUIRED)
ENDIF (QT5PAS_FOUND)
