summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2014-11-11 22:22:57 +0000
committerJosé Fonseca <jfonseca@vmware.com>2014-11-11 22:22:57 +0000
commit39072d2ba957dbafbd93496d47acf8f586037b28 (patch)
treef6a5693f4872c5539b9feb239b045873f37617bd /cmake
parent59a0a00c317642818ad652bd32251a0962a076ed (diff)
cmake: Don't falsely detect procps when building 32-bits binaries.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Findprocps.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmake/Findprocps.cmake b/cmake/Findprocps.cmake
new file mode 100644
index 00000000..dbf109b0
--- /dev/null
+++ b/cmake/Findprocps.cmake
@@ -0,0 +1,23 @@
+# - try to find procps directories and libraries
+#
+# Once done this will define:
+#
+# procps_FOUND
+# procps_INCLUDE_DIR
+# procps_LIBRARY
+#
+
+include (FindPackageMessage)
+
+if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ find_path (procps_INCLUDE_DIR proc/readproc.h)
+ find_library (procps_LIBRARY NAMES proc procps)
+ if (procps_INCLUDE_DIR AND procps_LIBRARY)
+ set (procps_FOUND 1)
+ mark_as_advanced (procps_FOUND)
+ find_package_message (procps "Found procps" "[${procps_LIBRARY}][${procps_INCLUDE_DIR}]")
+ else ()
+ find_package_message (procps "procps not found" "[${procps_LIBRARY}][${procps_INCLUDE_DIR}]")
+ endif ()
+endif()
+