Navigation


Changeset 801:728cc60a7be5 in freeDiameter


Ignore:
Timestamp:
Aug 22, 2012, 5:24:14 AM (12 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Test version only on found library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cmake/Modules/FindGnuTLS.cmake

    r797 r801  
    4141# Now check if the library is recent. gnutls_hash was added in 2.10.0.
    4242# Also test library is even more recent. gnutls_x509_trust_list_verify_crt was added in 3.00.0.
    43 IF( NOT( "${GNUTLS_VERSION_TEST_FOR}" STREQUAL "${GNUTLS_LIBRARY}" ))
    44   INCLUDE (CheckLibraryExists)
    45   MESSAGE(STATUS "Rechecking GNUTLS_VERSION_210 and GNUTLS_VERSION_300")
    46   UNSET(GNUTLS_VERSION_210)
    47   UNSET(GNUTLS_VERSION_210 CACHE)
    48   UNSET(GNUTLS_VERSION_300)
    49   UNSET(GNUTLS_VERSION_300 CACHE)
    50   GET_FILENAME_COMPONENT(GNUTLS_PATH ${GNUTLS_LIBRARY} PATH)
    51   CHECK_LIBRARY_EXISTS(gnutls gnutls_hash ${GNUTLS_PATH} GNUTLS_VERSION_210)
    52   CHECK_LIBRARY_EXISTS(gnutls gnutls_x509_trust_list_verify_crt ${GNUTLS_PATH} GNUTLS_VERSION_300)
    53   SET( GNUTLS_VERSION_TEST_FOR ${GNUTLS_LIBRARY} CACHE INTERNAL "Version the test was made against" )
    54 ENDIF (NOT( "${GNUTLS_VERSION_TEST_FOR}" STREQUAL "${GNUTLS_LIBRARY}" ))
     43IF(GNUTLS_FOUND)
     44  IF( NOT( "${GNUTLS_VERSION_TEST_FOR}" STREQUAL "${GNUTLS_LIBRARY}" ))
     45    INCLUDE (CheckLibraryExists)
     46    MESSAGE(STATUS "Rechecking GNUTLS_VERSION_210 and GNUTLS_VERSION_300")
     47    UNSET(GNUTLS_VERSION_210)
     48    UNSET(GNUTLS_VERSION_210 CACHE)
     49    UNSET(GNUTLS_VERSION_300)
     50    UNSET(GNUTLS_VERSION_300 CACHE)
     51    GET_FILENAME_COMPONENT(GNUTLS_PATH ${GNUTLS_LIBRARY} PATH)
     52    CHECK_LIBRARY_EXISTS(gnutls gnutls_hash ${GNUTLS_PATH} GNUTLS_VERSION_210)
     53    CHECK_LIBRARY_EXISTS(gnutls gnutls_x509_trust_list_verify_crt ${GNUTLS_PATH} GNUTLS_VERSION_300)
     54    SET( GNUTLS_VERSION_TEST_FOR ${GNUTLS_LIBRARY} CACHE INTERNAL "Version the test was made against" )
     55  ENDIF (NOT( "${GNUTLS_VERSION_TEST_FOR}" STREQUAL "${GNUTLS_LIBRARY}" ))
     56ENDIF(GNUTLS_FOUND)
Note: See TracChangeset for help on using the changeset viewer.