1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

Meta: Add Lagom option to disable building LibWeb

Compiling LibWeb for Lagom can add quite a bit of compile time. Add a
CMake option to disable it locally.
This commit is contained in:
Timothy Flynn 2022-09-12 15:35:54 -04:00 committed by Andreas Kling
parent 2cc947ede4
commit 10727ade4c
2 changed files with 30 additions and 25 deletions

View file

@ -11,3 +11,4 @@ serenity_option(ENABLE_FUZZERS_LIBFUZZER OFF CACHE BOOL "Build fuzzers using Cla
serenity_option(ENABLE_FUZZERS_OSSFUZZ OFF CACHE BOOL "Build OSS-Fuzz compatible fuzzers")
serenity_option(BUILD_LAGOM OFF CACHE BOOL "Build parts of the system targeting the host OS for fuzzing/testing")
serenity_option(ENABLE_LAGOM_CCACHE ON CACHE BOOL "Enable ccache for Lagom builds")
serenity_option(ENABLE_LAGOM_LIBWEB ON CACHE BOOL "Enable compiling LibWeb for Lagom builds")

View file

@ -525,6 +525,7 @@ if (BUILD_LAGOM)
)
# Web
if (ENABLE_LAGOM_LIBWEB)
include(libweb_generators)
file(GLOB LIBWEB_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibWeb/*.cpp")
file(GLOB LIBWEB_SUBDIR_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibWeb/*/*.cpp")
@ -550,6 +551,7 @@ if (BUILD_LAGOM)
LIBS LibMarkdown LibGemini LibGfx LibGL LibJS LibTextCodec LibWasm LibXML
)
generate_js_wrappers(LibWeb)
endif()
# WebSocket
file(GLOB LIBWEBSOCKET_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibWebSocket/*.cpp")
@ -601,9 +603,11 @@ if (BUILD_LAGOM)
set_target_properties(gml-format_lagom PROPERTIES OUTPUT_NAME gml-format)
target_link_libraries(gml-format_lagom LibCore LibGML LibMain)
if (ENABLE_LAGOM_LIBWEB)
add_executable(headless_browser_lagom ../../Userland/Utilities/headless-browser.cpp)
set_target_properties(headless_browser_lagom PROPERTIES OUTPUT_NAME headless-browser)
target_link_libraries(headless_browser_lagom LibWeb LibWebSocket LibHTTP LibJS LibGfx LibMain)
endif()
add_executable(js_lagom ../../Userland/Utilities/js.cpp)
set_target_properties(js_lagom PROPERTIES OUTPUT_NAME js)