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.
This commit is contained in:
Sam Atkins 2026-05-28 10:47:26 +01:00
parent ec2b96f4bf
commit d3ad37e635
4 changed files with 9 additions and 3 deletions

View file

@ -54,6 +54,7 @@ list(APPEND CMAKE_MODULE_PATH "${LADYBIRD_SOURCE_DIR}/Meta/CMake")
include(compile_options) include(compile_options)
include(check_for_dependencies) include(check_for_dependencies)
include(cmake_options) include(cmake_options)
include(ladybird_helper_processes)
if(ENABLE_ALL_THE_DEBUG_MACROS) if(ENABLE_ALL_THE_DEBUG_MACROS)
include(all_the_debug_macros) include(all_the_debug_macros)

View file

@ -0,0 +1,7 @@
set(ladybird_helper_processes
Compositor
ImageDecoder
RequestServer
WebContent
WebWorker
)

View file

@ -11,7 +11,7 @@ set(SOURCES
) )
add_executable(test-web ${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) target_link_libraries(test-web PRIVATE AK LibCore LibDiff LibFileSystem LibGfx LibImageDecoderClient LibIPC LibJS LibMain LibRequests LibURL LibWeb LibWebView)
if (APPLE) if (APPLE)

View file

@ -99,8 +99,6 @@ else()
) )
endif() endif()
set(ladybird_helper_processes Compositor ImageDecoder RequestServer WebContent WebWorker)
add_dependencies(ladybird ${ladybird_helper_processes}) add_dependencies(ladybird ${ladybird_helper_processes})
# FIXME: Increase support for building targets on Windows # FIXME: Increase support for building targets on Windows
if (NOT WIN32) if (NOT WIN32)