# Defines variables:
# - MyGUI_INCLUDE_DIRS
# - MyGUI_LIBRARIES

set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:$ENV{MYGUI_HOME}/lib/pkgconfig")
find_package(PkgConfig)
pkg_check_modules(MyGUI_PKGCONF QUIET MYGUI)

find_path(MyGUI_INCLUDE_DIR
  NAMES MyGUI.h
  HINTS ${MyGUI_PKGCONF_INCLUDEDIR} ${MyGUI_PKGCONF_INCLUDE_DIRS} $ENV{MYGUI_HOME}/include
  PATH_SUFFIXES MYGUI
)

find_library(MyGUI_LIBRARY
  NAMES MyGUIEngine
  HINTS ${MyGUI_PKGCONF_LIBDIR} ${MyGUI_PKGCONF_LIBRARY_DIRS} $ENV{MYGUI_HOME}/lib
)

mark_as_advanced(MyGUI_INCLUDE_DIR MyGUI_LIBRARY)

set(MyGUI_INCLUDE_DIRS ${MyGUI_INCLUDE_DIR})
set(MyGUI_LIBRARIES ${MyGUI_LIBRARY})
