From 9ced3ec84dfb2abd3bdda6db95e6b7e08b519e42 Mon Sep 17 00:00:00 2001 From: luozhiya Date: Sun, 7 Jul 2024 20:39:49 +0800 Subject: [PATCH] Meta: CMakeLists invoke check_style.py --- CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 57844b303c6..60f01ea7f48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,11 +85,14 @@ if (ENABLE_GUI_TARGETS) endif() add_custom_target(lint-shell-scripts - COMMAND "${ladybird_SOURCE_DIR}/Meta/lint-shell-scripts.sh" - USES_TERMINAL + COMMAND "${ladybird_SOURCE_DIR}/Meta/lint-shell-scripts.sh" + USES_TERMINAL ) -add_custom_target(check-style - COMMAND "${ladybird_SOURCE_DIR}/Meta/check-style.sh" +find_package(Python3 COMPONENTS Interpreter) +if (Python3_FOUND) + add_custom_target(check-style + COMMAND ${Python3_EXECUTABLE} "${ladybird_SOURCE_DIR}/Meta/check-style.py" USES_TERMINAL -) + ) +endif()