aboutsummaryrefslogtreecommitdiff
path: root/modules/FindGSSAPI.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/FindGSSAPI.cmake')
-rw-r--r--modules/FindGSSAPI.cmake31
1 files changed, 16 insertions, 15 deletions
diff --git a/modules/FindGSSAPI.cmake b/modules/FindGSSAPI.cmake
index 2ae17cd6..d79feea8 100644
--- a/modules/FindGSSAPI.cmake
+++ b/modules/FindGSSAPI.cmake
@@ -12,24 +12,25 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-IF(GSSAPI_LIBS AND GSSAPI_FLAVOR)
+if(GSSAPI_LIBS AND GSSAPI_FLAVOR)
# in cache already
- SET(GSSAPI_FOUND TRUE)
+ set(GSSAPI_FOUND TRUE)
-ELSE(GSSAPI_LIBS AND GSSAPI_FLAVOR)
+else(GSSAPI_LIBS AND GSSAPI_FLAVOR)
- FIND_PROGRAM(KRB5_CONFIG NAMES krb5-config PATHS
+ find_program(KRB5_CONFIG NAMES krb5-config PATHS
/opt/local/bin
ONLY_CMAKE_FIND_ROOT_PATH # this is required when cross compiling with cmake 2.6 and ignored with cmake 2.4, Alex
)
+ mark_as_advanced(KRB5_CONFIG)
#reset vars
set(GSSAPI_INCS)
set(GSSAPI_LIBS)
set(GSSAPI_FLAVOR)
- IF(KRB5_CONFIG)
+ if(KRB5_CONFIG)
SET(HAVE_KRB5_GSSAPI TRUE)
EXEC_PROGRAM(${KRB5_CONFIG} ARGS --libs gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_LIBS)
@@ -52,26 +53,26 @@ ELSE(GSSAPI_LIBS AND GSSAPI_FLAVOR)
IF(NOT HAVE_KRB5_GSSAPI)
IF (gssapi_flavor_tmp MATCHES "Sun Microsystems.*")
- MESSAGE(STATUS "Solaris Kerberos does not have GSSAPI; this is normal.")
- SET(GSSAPI_LIBS)
- SET(GSSAPI_INCS)
+ MESSAGE(STATUS "Solaris Kerberos does not have GSSAPI; this is normal.")
+ SET(GSSAPI_LIBS)
+ SET(GSSAPI_INCS)
ELSE(gssapi_flavor_tmp MATCHES "Sun Microsystems.*")
- MESSAGE(WARNING "${KRB5_CONFIG} failed unexpectedly.")
+ MESSAGE(WARNING "${KRB5_CONFIG} failed unexpectedly.")
ENDIF(gssapi_flavor_tmp MATCHES "Sun Microsystems.*")
ENDIF(NOT HAVE_KRB5_GSSAPI)
- IF(GSSAPI_LIBS) # GSSAPI_INCS can be also empty, so don't rely on that
- SET(GSSAPI_FOUND TRUE)
+ if(GSSAPI_LIBS) # GSSAPI_INCS can be also empty, so don't rely on that
+ set(GSSAPI_FOUND TRUE)
message(STATUS "Found GSSAPI: ${GSSAPI_LIBS}")
set(GSSAPI_INCS ${GSSAPI_INCS} CACHE STRING "The GSSAPI include directory" )
set(GSSAPI_LIBS ${GSSAPI_LIBS} CACHE STRING "The libraries needed to use GSSAPI" )
set(GSSAPI_FLAVOR ${GSSAPI_FLAVOR} CACHE STRING "The type of gss api, MIT or HEIMDAL")
- MARK_AS_ADVANCED(GSSAPI_INCS GSSAPI_LIBS GSSAPI_FLAVOR)
+ mark_as_advanced(GSSAPI_INCS GSSAPI_LIBS GSSAPI_FLAVOR)
- ENDIF(GSSAPI_LIBS)
+ endif(GSSAPI_LIBS)
- ENDIF(KRB5_CONFIG)
+ endif(KRB5_CONFIG)
-ENDIF(GSSAPI_LIBS AND GSSAPI_FLAVOR)
+endif(GSSAPI_LIBS AND GSSAPI_FLAVOR)