Sha256: 8abdf3c8d7a553c44e358ca3f7119b8bdcbafe7d78afc6901d7b85c7504c0f43

Contents?: true

Size: 1.41 KB

Versions: 8

Compression:

Stored size: 1.41 KB

Contents

INCLUDE(SanitizeBool)

# We try to find any packages our backends might use
FIND_PACKAGE(GSSAPI)
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
	INCLUDE(FindGSSFramework)
ENDIF()

IF(USE_GSSAPI)
	# Auto-select GSS backend
	SanitizeBool(USE_GSSAPI)
	IF (USE_GSSAPI STREQUAL ON)
		IF (GSSFRAMEWORK_FOUND)
			SET(USE_GSSAPI "GSS.framework")
		ELSEIF(GSSAPI_FOUND)
			SET(USE_GSSAPI "gssapi")
		ELSE()
			MESSAGE(FATAL_ERROR "Unable to autodetect a usable GSS backend."
				"Please pass the backend name explicitly (-DUSE_GSS=backend)")
		ENDIF()
	ENDIF()

	# Check that we can find what's required for the selected backend
	IF (USE_GSSAPI STREQUAL "GSS.framework")
		IF (NOT GSSFRAMEWORK_FOUND)
			MESSAGE(FATAL_ERROR "Asked for GSS.framework backend, but it wasn't found")
		ENDIF()

		LIST(APPEND LIBGIT2_LIBS ${GSSFRAMEWORK_LIBRARIES})

		SET(GIT_GSSFRAMEWORK 1)
		ADD_FEATURE_INFO(SPNEGO GIT_GSSFRAMEWORK "SPNEGO authentication support (${USE_GSSAPI})")
	ELSEIF (USE_GSSAPI STREQUAL "gssapi")
		IF (NOT GSSAPI_FOUND)
			MESSAGE(FATAL_ERROR "Asked for gssapi GSS backend, but it wasn't found")
		ENDIF()

		LIST(APPEND LIBGIT2_LIBS ${GSSAPI_LIBRARIES})

		SET(GIT_GSSAPI 1)
		ADD_FEATURE_INFO(SPNEGO GIT_GSSAPI "SPNEGO authentication support (${USE_GSSAPI})")
	ELSE()
		MESSAGE(FATAL_ERROR "Asked for backend ${USE_GSSAPI} but it wasn't found")
	ENDIF()
ELSE()
	SET(GIT_GSSAPI 0)
	ADD_FEATURE_INFO(SPNEGO NO "SPNEGO authentication support")
ENDIF()

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rugged-1.3.2.3 vendor/libgit2/cmake/SelectGSSAPI.cmake
rugged-1.3.2.1 vendor/libgit2/cmake/SelectGSSAPI.cmake
rugged-1.3.2 vendor/libgit2/cmake/SelectGSSAPI.cmake
rugged-1.3.1 vendor/libgit2/cmake/SelectGSSAPI.cmake
rugged-1.3.0 vendor/libgit2/cmake/SelectGSSAPI.cmake
rugged-1.2.0 vendor/libgit2/cmake/SelectGSSAPI.cmake
rugged-1.1.1 vendor/libgit2/cmake/SelectGSSAPI.cmake
rugged-1.1.0 vendor/libgit2/cmake/SelectGSSAPI.cmake