From d3ad37e63506719c9082f675cf3dac5bd5e2b670 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 28 May 2026 10:47:26 +0100 Subject: [PATCH] Meta: Define helper processes for Ladybird and test-web in one place These both require the same helper processes, and maintaining the same list in multiple places is error-prone. For example, I spent too long debugging why test-web was crashing, when the issue was that Compositor hadn't been rebuilt as test-web didn't depend on it. That problem can no longer happen if we define the same dependency list for both. --- CMakeLists.txt | 1 + Meta/CMake/ladybird_helper_processes.cmake | 7 +++++++ Tests/LibWeb/test-web/CMakeLists.txt | 2 +- UI/CMakeLists.txt | 2 -- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 Meta/CMake/ladybird_helper_processes.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index c6c9f02e8e..e229884852 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,7 @@ list(APPEND CMAKE_MODULE_PATH "${LADYBIRD_SOURCE_DIR}/Meta/CMake") include(compile_options) include(check_for_dependencies) include(cmake_options) +include(ladybird_helper_processes) if(ENABLE_ALL_THE_DEBUG_MACROS) include(all_the_debug_macros) diff --git a/Meta/CMake/ladybird_helper_processes.cmake b/Meta/CMake/ladybird_helper_processes.cmake new file mode 100644 index 0000000000..ffb5b9ad73 --- /dev/null +++ b/Meta/CMake/ladybird_helper_processes.cmake @@ -0,0 +1,7 @@ +set(ladybird_helper_processes + Compositor + ImageDecoder + RequestServer + WebContent + WebWorker +) diff --git a/Tests/LibWeb/test-web/CMakeLists.txt b/Tests/LibWeb/test-web/CMakeLists.txt index 76fdd14650..e0eb0aa525 100644 --- a/Tests/LibWeb/test-web/CMakeLists.txt +++ b/Tests/LibWeb/test-web/CMakeLists.txt @@ -11,7 +11,7 @@ set(SOURCES ) add_executable(test-web ${SOURCES}) -add_dependencies(test-web ladybird_build_resource_files ImageDecoder RequestServer WebContent WebWorker) +add_dependencies(test-web ladybird_build_resource_files ${ladybird_helper_processes}) target_link_libraries(test-web PRIVATE AK LibCore LibDiff LibFileSystem LibGfx LibImageDecoderClient LibIPC LibJS LibMain LibRequests LibURL LibWeb LibWebView) if (APPLE) diff --git a/UI/CMakeLists.txt b/UI/CMakeLists.txt index 0f71d3d7ad..ca1a4da003 100644 --- a/UI/CMakeLists.txt +++ b/UI/CMakeLists.txt @@ -99,8 +99,6 @@ else() ) endif() -set(ladybird_helper_processes Compositor ImageDecoder RequestServer WebContent WebWorker) - add_dependencies(ladybird ${ladybird_helper_processes}) # FIXME: Increase support for building targets on Windows if (NOT WIN32)