aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2014-01-19 00:48:22 +0000
committerJörg Mayer <jmayer@loplof.de>2014-01-19 00:48:22 +0000
commit2a21b01fbbc4c98acf0a02ef9a923d648110eb99 (patch)
tree9d738aa91bd0dcaf17b01825225587193f129903 /cmake/modules
parent5783452ab27e4f64d75eff9aab5587bdca415e02 (diff)
Add option to specify special permissions for dumpcap during cmake phase:
set(DUMPCAP_INSTALL_OPTION <val>) where val is one of "normal" "suid" "capabilities" Some things left to do: - Error out in cmake if setcap isn't found or libcap isn't found. - Move multivalue option handling into it's own macro (-file) with value checking svn path=/trunk/; revision=54840
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindSETCAP.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/modules/FindSETCAP.cmake b/cmake/modules/FindSETCAP.cmake
new file mode 100644
index 0000000000..4c77120a6b
--- /dev/null
+++ b/cmake/modules/FindSETCAP.cmake
@@ -0,0 +1,21 @@
+#
+# $Id$
+#
+# Look for the Linux setcap command (capabilities)
+#
+
+find_program( SETCAP_EXECUTABLE
+ NAMES
+ setcap
+ PATHS
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+
+include( FindPackageHandleStandardArgs )
+find_package_handle_standard_args( SETCAP DEFAULT_MSG SETCAP_EXECUTABLE )
+
+mark_as_advanced( SETCAP_EXECUTABLE )
+