summaryrefslogtreecommitdiff
path: root/Meta/CMake/check_for_dependencies.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Meta/CMake/check_for_dependencies.cmake')
-rw-r--r--Meta/CMake/check_for_dependencies.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/Meta/CMake/check_for_dependencies.cmake b/Meta/CMake/check_for_dependencies.cmake
new file mode 100644
index 0000000000..6ab71c9c43
--- /dev/null
+++ b/Meta/CMake/check_for_dependencies.cmake
@@ -0,0 +1,23 @@
+#
+# Check for the dependencies that the Serenity (target) and Lagom (host) builds require.
+#
+
+# FIXME: With cmake 3.18, we can change unzip/untar/gzip steps to use
+# file( ARCHIVE_EXTRACT) instead
+#
+# Additionally we have to emit an error message for each tool,
+# as REQUIRED only works with cmake 3.18 and above.
+find_program(UNZIP_TOOL unzip REQUIRED)
+if (NOT UNZIP_TOOL)
+ message(FATAL_ERROR "Failed to locate unzip on your machine, please install it and re-read the SerenityOS build documentation.")
+endif()
+
+find_program(TAR_TOOL tar REQUIRED)
+if (NOT TAR_TOOL)
+ message(FATAL_ERROR "Failed to locate tar on your machine, please install it and re-read the SerenityOS build documentation.")
+endif()
+
+find_program(GZIP_TOOL gzip REQUIRED)
+if (NOT GZIP_TOOL)
+ message(FATAL_ERROR "Failed to locate gzip on your machine, please install it and re-read the SerenityOS build documentation.")
+endif()