aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindCAP.cmake
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2009-09-10 07:04:54 +0000
committerJörg Mayer <jmayer@loplof.de>2009-09-10 07:04:54 +0000
commit9250a69a9976617c735679aa5383e53802e5b43e (patch)
tree99eb52cccfc2a1672730ac456218933c25d614a1 /cmake/modules/FindCAP.cmake
parent159904bdc49b8d3c35503d057d16bff7336767e1 (diff)
Update to add the last missing detection stuff.
Some of it is untested, kerberos is currently a hack. Apart from that, package detection should be complete. svn path=/trunk/; revision=29838
Diffstat (limited to 'cmake/modules/FindCAP.cmake')
-rw-r--r--cmake/modules/FindCAP.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/modules/FindCAP.cmake b/cmake/modules/FindCAP.cmake
new file mode 100644
index 0000000000..04e20d6df1
--- /dev/null
+++ b/cmake/modules/FindCAP.cmake
@@ -0,0 +1,32 @@
+# - Find capabilities
+# Find the native CAP includes and library
+#
+# CAP_INCLUDE_DIRS - where to find cap.h, etc.
+# CAP_LIBRARIES - List of libraries when using cap.
+# CAP_FOUND - True if cap found.
+
+
+IF (CAP_INCLUDE_DIRS)
+ # Already in cache, be silent
+ SET(CAP_FIND_QUIETLY TRUE)
+ENDIF (CAP_INCLUDE_DIRS)
+
+FIND_PATH(CAP_INCLUDE_DIR cap.h)
+
+SET(CAP_NAMES cap)
+FIND_LIBRARY(CAP_LIBRARY NAMES ${CAP_NAMES} )
+
+# handle the QUIETLY and REQUIRED arguments and set CAP_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAP DEFAULT_MSG CAP_LIBRARY CAP_INCLUDE_DIR)
+
+IF(CAP_FOUND)
+ SET( CAP_LIBRARIES ${CAP_LIBRARY} )
+ SET( CAP_INCLUDE_DIRS ${CAP_INCLUDE_DIR} )
+ELSE(CAP_FOUND)
+ SET( CAP_LIBRARIES )
+ SET( CAP_INCLUDE_DIRS )
+ENDIF(CAP_FOUND)
+
+MARK_AS_ADVANCED( CAP_LIBRARIES CAP_INCLUDE_DIRS )