test-web: Enable building in Windows CI

The tests are not registered with CTest yet
This commit is contained in:
ayeteadoe 2025-06-28 13:36:32 -07:00 committed by Andrew Kaster
commit 0b19c04b53
Notes: github-actions[bot] 2025-08-23 22:06:59 +00:00
3 changed files with 24 additions and 1 deletions

View file

@ -16,6 +16,7 @@ add_subdirectory(LibWasm)
if (ENABLE_GUI_TARGETS) if (ENABLE_GUI_TARGETS)
add_subdirectory(LibGfx) add_subdirectory(LibGfx)
add_subdirectory(LibWeb)
endif() endif()
# FIXME: Increase support for building targets on Windows # FIXME: Increase support for building targets on Windows
@ -28,7 +29,6 @@ add_subdirectory(LibXML)
if (ENABLE_GUI_TARGETS) if (ENABLE_GUI_TARGETS)
add_subdirectory(LibMedia) add_subdirectory(LibMedia)
add_subdirectory(LibWeb)
add_subdirectory(LibWebView) add_subdirectory(LibWebView)
endif() endif()

View file

@ -12,6 +12,21 @@ target_link_libraries(test-web PRIVATE AK LibCore LibDiff LibFileSystem LibGfx L
if (APPLE) if (APPLE)
target_compile_definitions(test-web PRIVATE LADYBIRD_BINARY_PATH="$<TARGET_FILE_DIR:ladybird>") target_compile_definitions(test-web PRIVATE LADYBIRD_BINARY_PATH="$<TARGET_FILE_DIR:ladybird>")
elseif (WIN32)
# FIXME: This is a hack to get around lld-link error undefined symbols in various libraries
target_link_libraries(test-web PRIVATE
$<FILTER:$<TARGET_OBJECTS:LibWebView>,INCLUDE,Application>
$<FILTER:$<TARGET_OBJECTS:LibWebView>,INCLUDE,Utilities>
$<FILTER:$<TARGET_OBJECTS:LibWebView>,INCLUDE,WebContentClient>
)
target_link_libraries(test-web PRIVATE LibDevTools)
find_package(pthread REQUIRED)
target_include_directories(test-web PRIVATE $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>)
endif()
# FIXME: Increase support for building targets on Windows
if (WIN32 AND ENABLE_WINDOWS_CI)
return()
endif() endif()
if (BUILD_TESTING) if (BUILD_TESTING)

View file

@ -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})
target_include_directories(${LADYBIRD_TARGET} ${LADYBIRD_SOURCE_DIR}/Services/) 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
$<FILTER:$<TARGET_OBJECTS:LibWebView>,INCLUDE,Application>
$<FILTER:$<TARGET_OBJECTS:LibWebView>,INCLUDE,UserAgent>
)
endif()
function(set_helper_process_properties) function(set_helper_process_properties)
set(targets ${ARGV}) set(targets ${ARGV})
if (APPLE) if (APPLE)