diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-03 14:32:17 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-03 14:32:17 +0000 |
commit | 36ebfd411b358fb4797d31d23f945e8f6844d15a (patch) | |
tree | 9c8982d1da82fdffea8d2a741dba82e927874869 /cmake/modules/FindGLIB.cmake | |
parent | 4ceb86d29a68ebe52b20c8c090bc90c68a58f8c8 (diff) |
* cmake: new directory, contains cmake build support.
See http://www.cmake.org for more informations.
Currently only unix will be buildable because some
win32 required files are still missing.
Diffstat (limited to 'cmake/modules/FindGLIB.cmake')
-rw-r--r-- | cmake/modules/FindGLIB.cmake | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake new file mode 100644 index 00000000..1fdaee95 --- /dev/null +++ b/cmake/modules/FindGLIB.cmake @@ -0,0 +1,42 @@ +# - Try to find the GLIB library +# Once done this will define +# +# GLIB_FOUND - system has GLIB +# GLIB_INCLUDES - the GLIB include directories +# GLIB_LIBRARIES - The libraries needed to use GLIB + +if (WIN32) + +INCLUDE(MacroGetenvWinPath) + +MACRO_GETENV_WIN_PATH(_program_FILES_DIR PROGRAMFILES) + +FIND_PATH(GLIB_INCLUDE_DIR glib.h + ${_program_FILES_DIR}/glib/include/glib-2.0 +) + + +# search for GLIB in the default install directory for applications (default of (n)make install) +FIND_LIBRARY(GLIB_LIBRARY NAMES glib-2.0 + PATHS + ${_program_FILES_DIR}/glib/lib +) + +if (GLIB_LIBRARY AND GLIB_INCLUDE_DIR) + set(GLIB_FOUND TRUE) + set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GLIB_INCLUDES}) + set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GLIB_LIBRARIES}) + +endif (GLIB_LIBRARY AND GLIB_INCLUDE_DIR) + +if (GLIB_FOUND) + if (NOT GLIB_FIND_QUIETLY) + message(STATUS "Found GLIB: ${GLIB_LIBRARY}") + endif (NOT GLIB_FIND_QUIETLY) +else (GLIB_FOUND) + if (GLIB_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find GLIB library") + endif (GLIB_FIND_REQUIRED) +endif (GLIB_FOUND) + +endif (WIN32) |