1 # - Try to find the GLIB library
2 # Once done this will define
4 # GLIB_FOUND - system has GLIB
5 # GLIB_INCLUDES - the GLIB include directories
6 # GLIB_LIBRARIES - The libraries needed to use GLIB
10 INCLUDE(MacroGetenvWinPath)
12 MACRO_GETENV_WIN_PATH(_program_FILES_DIR PROGRAMFILES)
14 FIND_PATH(GLIB_INCLUDE_DIR glib.h
15 ${_program_FILES_DIR}/glib/include/glib-2.0
19 # search for GLIB in the default install directory for applications (default of (n)make install)
20 FIND_LIBRARY(GLIB_LIBRARY NAMES glib-2.0
22 ${_program_FILES_DIR}/glib/lib
25 if (GLIB_LIBRARY AND GLIB_INCLUDE_DIR)
27 set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GLIB_INCLUDES})
28 set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GLIB_LIBRARIES})
30 endif (GLIB_LIBRARY AND GLIB_INCLUDE_DIR)
33 if (NOT GLIB_FIND_QUIETLY)
34 message(STATUS "Found GLIB: ${GLIB_LIBRARY}")
35 endif (NOT GLIB_FIND_QUIETLY)
37 if (GLIB_FIND_REQUIRED)
38 message(FATAL_ERROR "Could NOT find GLIB library")
39 endif (GLIB_FIND_REQUIRED)