diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-05-19 09:13:35 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-05-19 09:13:35 +0200 |
commit | badc0da3b74d99c90b7b28180d08cd6d08830254 (patch) | |
tree | bf4acef89fd445b0e406c0bebbf60fc7ff467fce /FindGnuTLS.cmake | |
parent | 1cfbc7298525656701f32224e1ed42a3e835835a (diff) | |
download | mad-badc0da3b74d99c90b7b28180d08cd6d08830254.tar mad-badc0da3b74d99c90b7b28180d08cd6d08830254.zip |
Make-Prozess auf CMake umgestellt
Diffstat (limited to 'FindGnuTLS.cmake')
-rw-r--r-- | FindGnuTLS.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/FindGnuTLS.cmake b/FindGnuTLS.cmake new file mode 100644 index 0000000..869444b --- /dev/null +++ b/FindGnuTLS.cmake @@ -0,0 +1,38 @@ +INCLUDE( FindPkgConfig ) + +IF ( GNUTLS_FIND_REQUIRED ) + SET( _pkgconfig_REQUIRED "REQUIRED" ) +ELSE( GNUTLS_FIND_REQUIRED ) + SET( _pkgconfig_REQUIRED "" ) +ENDIF ( GNUTLS_FIND_REQUIRED ) + +IF ( GNUTLS_MIN_VERSION ) + PKG_SEARCH_MODULE( GNUTLS ${_pkgconfig_REQUIRED} gnutls>=${GNUTLS_MIN_VERSION} ) +ELSE ( GNUTLS_MIN_VERSION ) + PKG_SEARCH_MODULE( GNUTLS ${_pkgconfig_REQUIRED} gnutls ) +ENDIF ( GNUTLS_MIN_VERSION ) + + +IF( NOT GNUTLS_FOUND AND NOT PKG_CONFIG_FOUND ) + FIND_PATH( GNUTLS_INCLUDE_DIRS gnutls/gnutls.h ) + FIND_LIBRARY( GNUTLS_LIBRARIES gnutls) + + # Report results + IF ( GNUTLS_LIBRARIES AND GNUTLS_INCLUDE_DIRS ) + SET( GNUTLS_FOUND 1 ) + IF ( NOT GNUTLS_FIND_QUIETLY ) + MESSAGE( STATUS "Found gnutls: ${GNUTLS_LIBRARIES}" ) + ENDIF ( NOT GNUTLS_FIND_QUIETLY ) + ELSE ( GNUTLS_LIBRARIES AND GNUTLS_INCLUDE_DIRS ) + IF ( GNUTLS_FIND_REQUIRED ) + MESSAGE( SEND_ERROR "Could NOT find gnutls" ) + ELSE ( GNUTLS_FIND_REQUIRED ) + IF ( NOT GNUTLS_FIND_QUIETLY ) + MESSAGE( STATUS "Could NOT find gnutls" ) + ENDIF ( NOT GNUTLS_FIND_QUIETLY ) + ENDIF ( GNUTLS_FIND_REQUIRED ) + ENDIF ( GNUTLS_LIBRARIES AND GNUTLS_INCLUDE_DIRS ) +ENDIF( NOT GNUTLS_FOUND AND NOT PKG_CONFIG_FOUND ) + +MARK_AS_ADVANCED( GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIRS ) + |