summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindGnuTLS.cmake13
1 files changed, 7 insertions, 6 deletions
diff --git a/Modules/FindGnuTLS.cmake b/Modules/FindGnuTLS.cmake
index a70823f..72ab511 100644
--- a/Modules/FindGnuTLS.cmake
+++ b/Modules/FindGnuTLS.cmake
@@ -40,11 +40,10 @@ IF (NOT WIN32)
SET(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER})
ENDIF (NOT WIN32)
-FIND_PATH(GNUTLS_INCLUDE_DIR gnutls.h
+FIND_PATH(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
HINTS
${PC_GNUTLS_INCLUDEDIR}
${PC_GNUTLS_INCLUDE_DIRS}
- PATH_SUFFIXES gnutls
)
FIND_LIBRARY(GNUTLS_LIBRARY NAMES gnutls libgnutls
@@ -53,13 +52,15 @@ FIND_LIBRARY(GNUTLS_LIBRARY NAMES gnutls libgnutls
${PC_GNUTLS_LIBRARY_DIRS}
)
+MARK_AS_ADVANCED(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
+
# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS DEFAULT_MSG GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
-MARK_AS_ADVANCED(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
-
-SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
-SET(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
+IF(GNUTLS_FOUND)
+ SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
+ SET(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
+ENDIF()