summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindSETCAP.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /cmake/modules/FindSETCAP.cmake
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/FindSETCAP.cmake')
-rw-r--r--cmake/modules/FindSETCAP.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/cmake/modules/FindSETCAP.cmake b/cmake/modules/FindSETCAP.cmake
new file mode 100644
index 0000000..1c468bd
--- /dev/null
+++ b/cmake/modules/FindSETCAP.cmake
@@ -0,0 +1,19 @@
+#
+# 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 )
+