mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
The function currently has 2 purposes: (1) To copy dependent dlls for executables to output binary directory. This ensures that these helper processes can be ran after a build given not all DLLs from vcpkg libs get implicitly copied to the bin folder. (2) Allow fully background and/or GUI processes to use the Windows Subsystem. This prevents unnecessarily launching a console for the process, as we either require no user interaction or the user interaction is all handled in the GUI.
39 lines
1.2 KiB
CMake
39 lines
1.2 KiB
CMake
set(SOURCES
|
|
Application.cpp
|
|
Fixture.cpp
|
|
Fuzzy.cpp
|
|
TestWebView.cpp
|
|
main.cpp
|
|
)
|
|
|
|
add_executable(test-web ${SOURCES})
|
|
add_dependencies(test-web ladybird_build_resource_files ImageDecoder RequestServer WebContent WebWorker)
|
|
target_link_libraries(test-web PRIVATE AK LibCore LibDiff LibFileSystem LibGfx LibImageDecoderClient LibIPC LibJS LibMain LibRequests LibURL LibWeb LibWebView)
|
|
|
|
if (APPLE)
|
|
target_compile_definitions(test-web PRIVATE LADYBIRD_BINARY_PATH="$<TARGET_FILE_DIR:ladybird>")
|
|
elseif (WIN32)
|
|
target_link_libraries(test-web PRIVATE LibDevTools)
|
|
find_package(pthread REQUIRED)
|
|
target_include_directories(test-web PRIVATE $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>)
|
|
lagom_windows_bin(test-web CONSOLE)
|
|
endif()
|
|
|
|
# FIXME: Increase support for building targets on Windows
|
|
if (WIN32 AND ENABLE_WINDOWS_CI)
|
|
return()
|
|
endif()
|
|
|
|
if (BUILD_TESTING)
|
|
find_package(Python3 REQUIRED)
|
|
|
|
add_test(
|
|
NAME LibWeb
|
|
COMMAND $<TARGET_FILE:test-web> --python-executable ${Python3_EXECUTABLE} --dump-failed-ref-tests --per-test-timeout 120 --verbose
|
|
)
|
|
|
|
set_tests_properties(LibWeb PROPERTIES
|
|
ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_PROJECT_ROOT}
|
|
TIMEOUT_SIGNAL_NAME SIGTERM)
|
|
endif()
|