summaryrefslogtreecommitdiff
path: root/cmake/FindPOPT.cmake
diff options
context:
space:
mode:
authorAlan Antonuk <aega@med.umich.edu>2011-11-01 18:03:53 -0400
committerAlan Antonuk <aega@med.umich.edu>2011-11-01 18:03:53 -0400
commit89db105a5a7596bfdf00824911a5cba97d0e6668 (patch)
treea190cb2eaeccbd4f071a9e5b027a1a3a6b600fba /cmake/FindPOPT.cmake
parent7715ad8f53930d3e5956d219cfc0233eea59a2b5 (diff)
downloadrabbitmq-c-github-ask-89db105a5a7596bfdf00824911a5cba97d0e6668.tar.gz
Adding POPT CMake lib finder.
Utilities in the tools/ directory will now be built if the popt library is found
Diffstat (limited to 'cmake/FindPOPT.cmake')
-rw-r--r--cmake/FindPOPT.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/FindPOPT.cmake b/cmake/FindPOPT.cmake
new file mode 100644
index 0000000..e0af678
--- /dev/null
+++ b/cmake/FindPOPT.cmake
@@ -0,0 +1,18 @@
+INCLUDE(LibFindMacros)
+
+# Find the include directories
+FIND_PATH(POPT_INCLUDE_DIR
+ NAMES popt.h
+ HINTS ${POPT_PREFIX}/include
+ )
+
+FIND_LIBRARY(POPT_LIBRARY
+ NAMES popt
+ HINTS ${POPT_PREFIX}/lib
+ )
+
+SET(POPT_PROCESS_INCLUDES POPT_INCLUDE_DIR)
+SET(POPT_PROCESS_LIBS POPT_LIBRARY)
+
+LIBFIND_PROCESS(POPT)
+