aboutsummaryrefslogtreecommitdiff
path: root/find-modules/FindReuseTool.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'find-modules/FindReuseTool.cmake')
-rw-r--r--find-modules/FindReuseTool.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/find-modules/FindReuseTool.cmake b/find-modules/FindReuseTool.cmake
new file mode 100644
index 00000000..9377f49e
--- /dev/null
+++ b/find-modules/FindReuseTool.cmake
@@ -0,0 +1,23 @@
+# WARNING: FOR ECM-INTERNAL USE ONLY, DO NOT USE IN OWN PROJECTS
+# THIS FILE MIGHT DISAPPEAR IN FUTURE VERSIONS OF ECM.
+
+# Finds the REUSE Tool by FSFE: https://github.com/fsfe/reuse-tool
+#
+# REUSE_TOOL_FOUND - True if REUSE tool is found.
+# REUSE_TOOL_EXECUTABLE - Path to executable
+
+#=============================================================================
+# SPDX-FileCopyrightText: 2020 Andreas Cord-Landwehr <cordlandwehr@kde.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#=============================================================================
+
+find_program(REUSETOOL_EXECUTABLE NAMES reuse)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(ReuseTool
+ FOUND_VAR
+ REUSETOOL_FOUND
+ REQUIRED_VARS
+ REUSE_TOOL_EXECUTABLE
+)