diff options
author | Jörg Mayer <jmayer@loplof.de> | 2011-05-12 21:13:00 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2011-05-12 21:13:00 +0000 |
commit | 811afde69ec16c3de190bb50a0e029b11afe6494 (patch) | |
tree | 457b4c51f03e94db2be21802f983dfd2be2adc6c /cmake/modules | |
parent | 4a90e977e0492d4538a8cba3517fedcde9f8913d (diff) |
Play catch up with recent configure.in changes:
- Link dumpcap (and only dumpcap) against gthread
- gtk/gsm_a_stat.c and gtk/menus.c are dirty when configured with UI_MANAGER=1
- Add support run "cmake ... -DWANT_PACKET_EDITOR=1 ..."
svn path=/trunk/; revision=37103
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindGTHREAD2.cmake | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/cmake/modules/FindGTHREAD2.cmake b/cmake/modules/FindGTHREAD2.cmake new file mode 100644 index 0000000000..8bcbacac72 --- /dev/null +++ b/cmake/modules/FindGTHREAD2.cmake @@ -0,0 +1,61 @@ +# - Try to find GThread2 +# +# $Id$ +# +# Find GThread headers, libraries and the answer to all questions. +# +# GTHREAD2_FOUND True if GTHREAD2 got found +# GTHREAD2_INCLUDE_DIRS Location of GTHREAD2 headers +# GTHREAD2_LIBRARIES List of libraries to use GTHREAD2 +# +# Copyright (c) 2008 Bjoern Ricks <bjoern.ricks@googlemail.com> +# +# Redistribution and use is allowed according to the terms of the New +# BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +INCLUDE( FindPkgConfig ) + +IF ( GTHREAD2_FIND_REQUIRED ) + SET( _pkgconfig_REQUIRED "REQUIRED" ) +ELSE( GTHREAD2_FIND_REQUIRED ) + SET( _pkgconfig_REQUIRED "" ) +ENDIF ( GTHREAD2_FIND_REQUIRED ) + +IF ( GTHREAD2_MIN_VERSION ) + PKG_SEARCH_MODULE( GTHREAD2 ${_pkgconfig_REQUIRED} gthread-2.0>=${GTHREAD2_MIN_VERSION} ) +ELSE ( GTHREAD2_MIN_VERSION ) + PKG_SEARCH_MODULE( GTHREAD2 ${_pkgconfig_REQUIRED} gthread-2.0 ) +ENDIF ( GTHREAD2_MIN_VERSION ) + + +IF( NOT GTHREAD2_FOUND AND NOT PKG_CONFIG_FOUND ) + FIND_PATH( GTHREAD2_INCLUDE_DIRS gthread.h PATH_SUFFIXES glib-2.0 glib GLib.framework/Headers/glib ) + IF ( APPLE ) + FIND_LIBRARY( GTHREAD2_LIBRARIES glib ) + ELSE ( APPLE ) + FIND_LIBRARY( GTHREAD2_LIBRARIES gthread-2.0 ) + ENDIF ( APPLE ) + + #MESSAGE( STATUS "Gthread headers: ${GTHREAD2_INCLUDE_DIRS}" ) + #MESSAGE( STATUS "Gthread libs: ${GTHREAD2_LIBRARIES}" ) + + # Report results + IF ( GTHREAD2_LIBRARIES AND GTHREAD2_INCLUDE_DIRS ) + SET( GTHREAD2_FOUND 1 ) + IF ( NOT GTHREAD2_FIND_QUIETLY ) + MESSAGE( STATUS "Found GTHREAD2: ${GTHREAD2_LIBRARIES} ${GTHREAD2_INCLUDE_DIRS}" ) + ENDIF ( NOT GTHREAD2_FIND_QUIETLY ) + ELSE ( GTHREAD2_LIBRARIES AND GTHREAD2_INCLUDE_DIRS ) + IF ( GTHREAD2_FIND_REQUIRED ) + MESSAGE( SEND_ERROR "Could NOT find GTHREAD2" ) + ELSE ( GTHREAD2_FIND_REQUIRED ) + IF ( NOT GTHREAD2_FIND_QUIETLY ) + MESSAGE( STATUS "Could NOT find GTHREAD2" ) + ENDIF ( NOT GTHREAD2_FIND_QUIETLY ) + ENDIF ( GTHREAD2_FIND_REQUIRED ) + ENDIF ( GTHREAD2_LIBRARIES AND GTHREAD2_INCLUDE_DIRS ) +ENDIF( NOT GTHREAD2_FOUND AND NOT PKG_CONFIG_FOUND ) + +MARK_AS_ADVANCED( GTHREAD2_LIBRARIES GTHREAD2_INCLUDE_DIRS ) |