From: <dg...@su...> - 2009-01-16 11:11:26
|
Author: bricks Date: Fri Jan 16 12:10:26 2009 New Revision: 5160 URL: http://www.opensync.org/changeset/5160 Log: check for gregex.h in cmake glib module Modified: branches/3rd-party-cmake-modules/modules/FindGLIB2.cmake Modified: branches/3rd-party-cmake-modules/modules/FindGLIB2.cmake ============================================================================== --- branches/3rd-party-cmake-modules/modules/FindGLIB2.cmake Fri Jan 16 12:09:24 2009 (r5159) +++ branches/3rd-party-cmake-modules/modules/FindGLIB2.cmake Fri Jan 16 12:10:26 2009 (r5160) @@ -5,6 +5,9 @@ # GLIB2_INCLUDE_DIRS - the GLib2 include directory # GLIB2_LIBRARIES - Link these to use GLib2 # +# HAVE_GLIB_GREGEX_H glib has gregex.h header and +# supports g_regex_match_simple +# # Copyright (c) 2006 Andreas Schneider <ma...@cy...> # Copyright (c) 2006 Philippe Bernery <phi...@gm...> # Copyright (c) 2007 Daniel Gollub <dg...@su...> @@ -202,3 +205,13 @@ MARK_AS_ADVANCED(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY) ENDIF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS) + +IF ( GLIB2_FOUND ) + # Check if system has a newer version of glib + # which supports g_regex_match_simple + INCLUDE( CheckIncludeFiles ) + SET( CMAKE_REQUIRED_INCLUDES ${GLIB2_INCLUDE_DIRS} ) + CHECK_INCLUDE_FILES ( glib/gregex.h HAVE_GLIB_GREGEX_H ) + # Reset CMAKE_REQUIRED_INCLUDES + SET( CMAKE_REQUIRED_INCLUDES "" ) +ENDIF( GLIB2_FOUND ) |