summaryrefslogtreecommitdiffstats
path: root/cmake/FindGSSFramework.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindGSSFramework.cmake')
-rw-r--r--cmake/FindGSSFramework.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/FindGSSFramework.cmake b/cmake/FindGSSFramework.cmake
new file mode 100644
index 0000000..1b0c936
--- /dev/null
+++ b/cmake/FindGSSFramework.cmake
@@ -0,0 +1,28 @@
+# Find GSS.framework
+# This will define :
+#
+# GSSFRAMEWORK_FOUND
+# GSSFRAMEWORK_INCLUDE_DIR
+# GSSFRAMEWORK_LIBRARIES
+# GSSFRAMEWORK_LDFLAGS
+#
+
+find_path(GSSFRAMEWORK_INCLUDE_DIR NAMES GSS.h)
+find_library(GSSFRAMEWORK_LIBRARIES NAMES GSS)
+if(GSSFRAMEWORK_INCLUDE_DIR AND GSSFRAMEWORK_LIBRARIES)
+ if(NOT CoreFoundation_FIND_QUIETLY)
+ message(STATUS "Found GSS.framework ${GSSFRAMEWORK_LIBRARIES}")
+ endif()
+ set(GSSFRAMEWORK_FOUND TRUE)
+ set(GSSFRAMEWORK_LDFLAGS "-framework GSS")
+endif()
+
+if(GSS_FIND_REQUIRED AND NOT GSSFRAMEWORK_FOUND)
+ message(FATAL_ERROR "CoreFoundation not found")
+endif()
+
+mark_as_advanced(
+ GSSFRAMEWORK_INCLUDE_DIR
+ GSSFRAMEWORK_LIBRARIES
+ GSSFRAMEWORK_LDFLAGS
+)