From 0b19c04b53361fa93f78f8627ea95232010ef203 Mon Sep 17 00:00:00 2001 From: ayeteadoe Date: Sat, 28 Jun 2025 13:36:32 -0700 Subject: [PATCH] test-web: Enable building in Windows CI The tests are not registered with CTest yet --- Tests/CMakeLists.txt | 2 +- Tests/LibWeb/test-web/CMakeLists.txt | 15 +++++++++++++++ UI/CMakeLists.txt | 8 ++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 2046cb0e11c..64a6d930de2 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -16,6 +16,7 @@ add_subdirectory(LibWasm) if (ENABLE_GUI_TARGETS) add_subdirectory(LibGfx) + add_subdirectory(LibWeb) endif() # FIXME: Increase support for building targets on Windows @@ -28,7 +29,6 @@ add_subdirectory(LibXML) if (ENABLE_GUI_TARGETS) add_subdirectory(LibMedia) - add_subdirectory(LibWeb) add_subdirectory(LibWebView) endif() diff --git a/Tests/LibWeb/test-web/CMakeLists.txt b/Tests/LibWeb/test-web/CMakeLists.txt index bd654f0c398..53af005107a 100644 --- a/Tests/LibWeb/test-web/CMakeLists.txt +++ b/Tests/LibWeb/test-web/CMakeLists.txt @@ -12,6 +12,21 @@ target_link_libraries(test-web PRIVATE AK LibCore LibDiff LibFileSystem LibGfx L if (APPLE) target_compile_definitions(test-web PRIVATE LADYBIRD_BINARY_PATH="$") +elseif (WIN32) + # FIXME: This is a hack to get around lld-link error undefined symbols in various libraries + target_link_libraries(test-web PRIVATE + $,INCLUDE,Application> + $,INCLUDE,Utilities> + $,INCLUDE,WebContentClient> + ) + target_link_libraries(test-web PRIVATE LibDevTools) + find_package(pthread REQUIRED) + target_include_directories(test-web PRIVATE $) +endif() + +# FIXME: Increase support for building targets on Windows +if (WIN32 AND ENABLE_WINDOWS_CI) + return() endif() if (BUILD_TESTING) diff --git a/UI/CMakeLists.txt b/UI/CMakeLists.txt index 63eda386289..2e986483fb8 100644 --- a/UI/CMakeLists.txt +++ b/UI/CMakeLists.txt @@ -76,6 +76,14 @@ target_include_directories(${LADYBIRD_TARGET} ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(${LADYBIRD_TARGET} ${LADYBIRD_SOURCE_DIR}) target_include_directories(${LADYBIRD_TARGET} ${LADYBIRD_SOURCE_DIR}/Services/) +if(WIN32) + # FIXME: This is a hack to get around lld-link error undefined symbols in various libraries + target_link_libraries(${LADYBIRD_TARGET} PRIVATE + $,INCLUDE,Application> + $,INCLUDE,UserAgent> + ) +endif() + function(set_helper_process_properties) set(targets ${ARGV}) if (APPLE)