summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-16 10:46:45 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-16 10:46:45 -0400
commit2ba6f30ca09e805d90c164fba776248373aef621 (patch)
treec39305a5cafe72b8d861dd5586aeb411b90d41db /cmake
parentad82364f613d71385f0e5de93b0d155b97a24b3e (diff)
cmake tidy-up
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindPAM.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/cmake/FindPAM.cmake b/cmake/FindPAM.cmake
new file mode 100644
index 0000000..1ada899
--- /dev/null
+++ b/cmake/FindPAM.cmake
@@ -0,0 +1,20 @@
+find_path(PAM_INCLUDE_DIR NAMES security/pam_appl.h security/pam_misc.h)
+find_library(PAM_LIBRARY pam)
+
+if (PAM_INCLUDE_DIR AND PAM_LIBRARY)
+ set(PAM_FOUND TRUE)
+endif (PAM_INCLUDE_DIR AND PAM_LIBRARY)
+
+if (PAM_INCLUDE_DIR)
+ message(STATUS "Found PAM includes ${PAM_INCLUDE_DIR}")
+else (PAM_INCLUDE_DIR)
+ message(FATAL_ERROR "PAM includes were not found")
+endif (PAM_INCLUDE_DIR)
+
+if (PAM_LIBRARY)
+ message(STATUS "Found PAM library ${PAM_LIBRARY}")
+else (PAM_LIBRARY)
+ message(FATAL_ERROR "PAM library was not found")
+endif (PAM_LIBRARY)
+
+mark_as_advanced(PAM_INCLUDE_DIR PAM_LIBRARY)