diff --git a/CMakeLists.txt b/CMakeLists.txt index d9a42d57638..25cac077b23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,3 +74,13 @@ endif() include(CTest) # for BUILD_TESTING option, default ON add_subdirectory(Ladybird) + +add_custom_target(lint-shell-scripts + COMMAND "${ladybird_SOURCE_DIR}/Meta/lint-shell-scripts.sh" + USES_TERMINAL +) + +add_custom_target(check-style + COMMAND "${ladybird_SOURCE_DIR}/Meta/check-style.sh" + USES_TERMINAL +) diff --git a/Meta/CMake/code_generators.cmake b/Meta/CMake/code_generators.cmake index 4613cb91299..d68bdcf9abb 100644 --- a/Meta/CMake/code_generators.cmake +++ b/Meta/CMake/code_generators.cmake @@ -23,12 +23,6 @@ function(embed_as_string_view name source_file output source_variable_name) add_dependencies(all_generated "generate_${name}") endfunction() -function(stringify_gml source output string_name) - set(source ${CMAKE_CURRENT_SOURCE_DIR}/${source}) - get_filename_component(output_name ${output} NAME) - embed_as_string_view(${output_name} ${source} ${output} ${string_name}) -endfunction() - function(compile_ipc source output) if (NOT IS_ABSOLUTE ${source}) set(source ${CMAKE_CURRENT_SOURCE_DIR}/${source}) @@ -50,25 +44,3 @@ function(compile_ipc source output) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${current_source_dir_relative}" OPTIONAL) endfunction() -function(generate_state_machine source header) - get_filename_component(header_name ${header} NAME) - set(target_name "generate_${header_name}") - # Note: This function is called twice with the same header, once in the kernel - # and once in Userland/LibVT, this check makes sure that only one target - # is generated for that header. - if(NOT TARGET ${target_name}) - set(source ${CMAKE_CURRENT_SOURCE_DIR}/${source}) - set(output ${CMAKE_CURRENT_BINARY_DIR}/${header}) - add_custom_command( - OUTPUT ${output} - COMMAND $ ${source} -o ${output}.tmp - COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${output}.tmp ${output} - COMMAND "${CMAKE_COMMAND}" -E remove ${output}.tmp - VERBATIM - DEPENDS Lagom::StateMachineGenerator - MAIN_DEPENDENCY ${source} - ) - add_custom_target(${target_name} DEPENDS ${output}) - add_dependencies(all_generated ${target_name}) - endif() -endfunction() diff --git a/Meta/CMake/common_options.cmake b/Meta/CMake/common_options.cmake index 858741c793f..f35917b1e14 100644 --- a/Meta/CMake/common_options.cmake +++ b/Meta/CMake/common_options.cmake @@ -24,11 +24,6 @@ serenity_option(INCLUDE_FLAC_SPEC_TESTS OFF CACHE BOOL "Download and include the serenity_option(ENABLE_CACERT_DOWNLOAD ON CACHE BOOL "Enable download of cacert.pem at build time") serenity_option(ENABLE_ACCELERATED_GRAPHICS ON CACHE BOOL "Enable use of accelerated graphics APIs") -serenity_option(HACKSTUDIO_BUILD OFF CACHE BOOL "Automatically enabled when building from HackStudio") - -serenity_option(ENABLE_JAKT OFF CACHE BOOL "Enable building jakt files") -serenity_option(JAKT_SOURCE_DIR "" CACHE STRING "Pre-existing jakt language source directory") - serenity_option(SERENITY_CACHE_DIR "${PROJECT_BINARY_DIR}/../caches" CACHE PATH "Location of shared cache of downloaded files") serenity_option(ENABLE_NETWORK_DOWNLOADS ON CACHE BOOL "Allow downloads of required files. If OFF, required files must already be present in SERENITY_CACHE_DIR") diff --git a/Meta/CMake/jakt.cmake b/Meta/CMake/jakt.cmake deleted file mode 100644 index 2f813f278fe..00000000000 --- a/Meta/CMake/jakt.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# -# Builds the jakt bootstrap compiler as a host tool for Lagom to compile files written in jakt -# - -include(FetchContent) - -FetchContent_Declare(jakt - GIT_REPOSITORY https://github.com/SerenityOS/jakt.git - GIT_TAG main - GIT_SHALLOW TRUE -) - -# Allow developers to skip download/update steps with local checkout -if (JAKT_SOURCE_DIR) - set(FETCHCONTENT_SOURCE_DIR_JAKT ${JAKT_SOURCE_DIR} CACHE PATH "Developer's pre-existing jakt source directory" FORCE) - message(STATUS "Using pre-existing JAKT_SOURCE_DIR: ${JAKT_SOURCE_DIR}") -endif() - -set(JAKT_BUILD_TESTING OFF) -FetchContent_MakeAvailable(jakt) diff --git a/Meta/CMake/serenity_components.cmake b/Meta/CMake/serenity_components.cmake deleted file mode 100644 index d7056aacbee..00000000000 --- a/Meta/CMake/serenity_components.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# -# Target properties and functions for optionally building libraries and applications -# - -define_property(TARGET PROPERTY SERENITY_COMPONENT_NAME BRIEF_DOCS "SerenityOS component name" FULL_DOCS "-") -define_property(TARGET PROPERTY SERENITY_COMPONENT_DESCRIPTION BRIEF_DOCS "SerenityOS component description" FULL_DOCS "-") -define_property(TARGET PROPERTY SERENITY_COMPONENT_RECOMMENDED BRIEF_DOCS "SerenityOS component recommended (flag)" FULL_DOCS "-") -define_property(TARGET PROPERTY SERENITY_COMPONENT_REQUIRED BRIEF_DOCS "SerenityOS component required (flag)" FULL_DOCS "-") -define_property(TARGET PROPERTY SERENITY_COMPONENT_DEPENDS BRIEF_DOCS "SerenityOS component dependencies" FULL_DOCS "-") - -function(serenity_component name) - cmake_parse_arguments(PARSE_ARGV 1 SERENITY_COMPONENT "RECOMMENDED;REQUIRED" "DESCRIPTION" "TARGETS;DEPENDS") - string(TOUPPER "${name}" NAME_UPPER) - option("BUILD_${NAME_UPPER}" "Build ${name}" "${SERENITY_COMPONENT_RECOMMENDED}") - add_custom_target("Component${name}") - set_target_properties( - "Component${name}" PROPERTIES - SERENITY_COMPONENT_NAME "${name}" - SERENITY_COMPONENT_DESCRIPTION "${SERENITY_COMPONENT_DESCRIPTION}" - SERENITY_COMPONENT_RECOMMENDED "${SERENITY_COMPONENT_RECOMMENDED}" - SERENITY_COMPONENT_REQUIRED "${SERENITY_COMPONENT_REQUIRED}" - SERENITY_COMPONENT_DEPENDS "${SERENITY_COMPONENT_DEPENDS}" - ) - if(NOT "${SERENITY_COMPONENT_TARGETS}" STREQUAL "") # note: one component is /bin/false, which makes this tricky - foreach(target IN LISTS SERENITY_COMPONENT_TARGETS) - add_dependencies("Component${name}" "${target}") - endforeach() - endif() - if(BUILD_EVERYTHING OR "${BUILD_${NAME_UPPER}}" OR SERENITY_COMPONENT_REQUIRED) - add_dependencies(components "Component${name}") - endif() - foreach(dependency IN LISTS SERENITY_COMPONENT_DEPENDS) - add_dependencies("Component${name}" "Component${dependency}") - endforeach() -endfunction() - -function(export_components_helper file_name current_dir) - get_property(sub_dirs DIRECTORY "${current_dir}" PROPERTY SUBDIRECTORIES) - foreach(sub_dir IN LISTS sub_dirs) - export_components_helper("${file_name}" "${sub_dir}") - endforeach() - - get_property(targets DIRECTORY "${current_dir}" PROPERTY BUILDSYSTEM_TARGETS) - foreach(target IN LISTS targets) - get_target_property(type "${target}" TYPE) - if (type STREQUAL "INTERFACE_LIBRARY") - continue() # Custom properties are not allowed to be set on INTERFACE libraries - endif() - get_target_property(component_name "${target}" SERENITY_COMPONENT_NAME) - if(NOT "${component_name}" STREQUAL "" AND NOT "${component_name}" STREQUAL "component_name-NOTFOUND") - get_target_property(component_name "${target}" SERENITY_COMPONENT_NAME) - get_target_property(component_description "${target}" SERENITY_COMPONENT_DESCRIPTION) - get_target_property(component_recommended "${target}" SERENITY_COMPONENT_RECOMMENDED) - get_target_property(component_required "${target}" SERENITY_COMPONENT_REQUIRED) - get_target_property(component_depends "${target}" SERENITY_COMPONENT_DEPENDS) - file(APPEND "${file_name}" "[${component_name}]\n") - file(APPEND "${file_name}" "description=${component_description}\n") - if(component_recommended) - file(APPEND "${file_name}" "recommended=1\n") - else() - file(APPEND "${file_name}" "recommended=0\n") - endif() - if(component_required) - file(APPEND "${file_name}" "required=1\n") - else() - file(APPEND "${file_name}" "required=0\n") - endif() - string(TOUPPER "${component_name}" component_name_upper) - if("${BUILD_${component_name_upper}}") - file(APPEND "${file_name}" "user_selected=1\n") - else() - file(APPEND "${file_name}" "user_selected=0\n") - endif() - - file(APPEND "${file_name}" "depends=${component_depends}\n") - file(APPEND "${file_name}" "\n") - endif() - endforeach() -endfunction() - -function(export_components file_name) - file(WRITE "${file_name}" "[Global]\n") - if(BUILD_EVERYTHING) - file(APPEND "${file_name}" "build_everything=1\n") - else() - file(APPEND "${file_name}" "build_everything=0\n") - endif() - file(APPEND "${file_name}" "\n") - export_components_helper("${file_name}" "${CMAKE_CURRENT_SOURCE_DIR}") -endfunction() diff --git a/Meta/CMake/utils.cmake b/Meta/CMake/utils.cmake index cc224bd3681..506ec783c90 100644 --- a/Meta/CMake/utils.cmake +++ b/Meta/CMake/utils.cmake @@ -1,5 +1,4 @@ -include(${CMAKE_CURRENT_LIST_DIR}/serenity_components.cmake) include(${CMAKE_CURRENT_LIST_DIR}/code_generators.cmake) function(serenity_set_implicit_links target_name) @@ -149,20 +148,6 @@ function(serenity_app target_name) endif() endfunction() -function(embed_resource target section file) - get_filename_component(asm_file "${file}" NAME) - set(asm_file "${CMAKE_CURRENT_BINARY_DIR}/${target}-${section}.s") - get_filename_component(input_file "${file}" ABSOLUTE) - file(SIZE "${input_file}" file_size) - add_custom_command( - OUTPUT "${asm_file}" - COMMAND "${SerenityOS_SOURCE_DIR}/Meta/generate-embedded-resource-assembly.sh" "${asm_file}" "${section}" "${input_file}" "${file_size}" - DEPENDS "${input_file}" "${SerenityOS_SOURCE_DIR}/Meta/generate-embedded-resource-assembly.sh" - COMMENT "Generating ${asm_file}" - ) - target_sources("${target}" PRIVATE "${asm_file}") -endfunction() - function(remove_path_if_version_changed version version_file cache_path) set(version_differs YES) diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index a62d13ec2b4..1532b9821e2 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -311,9 +311,6 @@ macro(add_serenity_subdirectory path) add_subdirectory("${SERENITY_PROJECT_ROOT}/${path}" "${CMAKE_CURRENT_BINARY_DIR}/${path}") endmacro() -add_custom_target(components ALL) -option(BUILD_EVERYTHING "Build all optional components" ON) - if (NOT TARGET all_generated) # Meta target to run all code-gen steps in the build. add_custom_target(all_generated) @@ -670,8 +667,6 @@ endif() if (ENABLE_FUZZERS) add_subdirectory(Fuzzers) -else() - export_components("${CMAKE_BINARY_DIR}/components.ini") endif() include(ca_certificates_data) diff --git a/Meta/Lagom/Tools/CMakeLists.txt b/Meta/Lagom/Tools/CMakeLists.txt index 11016d41144..8fa80b6bbd2 100644 --- a/Meta/Lagom/Tools/CMakeLists.txt +++ b/Meta/Lagom/Tools/CMakeLists.txt @@ -14,7 +14,3 @@ endfunction() add_subdirectory(CodeGenerators) add_subdirectory(ConfigureComponents) add_subdirectory(IPCMagicLinter) - -if (ENABLE_JAKT) - include(jakt) -endif() diff --git a/Meta/generate-embedded-resource-assembly.sh b/Meta/generate-embedded-resource-assembly.sh deleted file mode 100755 index bb1d6197539..00000000000 --- a/Meta/generate-embedded-resource-assembly.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [ -z "$1" ]; then - echo "ERROR: No output file specified" - exit 1 -fi - -OUTPUT_FILE="$1" -shift - -rm -f "${OUTPUT_FILE}" - -while (( "$#" >= 3 )); do - SECTION_NAME="$1" - INPUT_FILE="$2" - FILE_SIZE="$3" - - { - printf ' .file "%s"\n' "${OUTPUT_FILE}" - printf ' .data\n' - printf ' .section %s, "a", @progbits\n' "${SECTION_NAME}" - printf ' .align 4\n' - printf ' .globl %s\n' "${SECTION_NAME}_start" - printf ' .type %s, @object\n' "${SECTION_NAME}_start" - printf ' .size %s, 4\n' "${SECTION_NAME}_start" - printf '%s:\n' "${SECTION_NAME}_start" - printf ' .incbin "%s"\n' "${INPUT_FILE}" - printf ' .section serenity_embedded_resource_info, "a", @progbits\n' - printf ' .align 4\n' - printf ' .globl %s\n' "${SECTION_NAME}_size" - printf ' .type %s, @object\n' "${SECTION_NAME}_size" - printf ' .size %s, 4\n' "${SECTION_NAME}_size" - printf '%s:\n' "${SECTION_NAME}_size" - printf ' .long %s\n' "${FILE_SIZE}" - printf '\n' - } >> "${OUTPUT_FILE}" - shift 3 -done diff --git a/Meta/install-ports-tree.sh b/Meta/install-ports-tree.sh deleted file mode 100755 index 7a7c079ef38..00000000000 --- a/Meta/install-ports-tree.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -SERENITY_PORTS_DIR="${LADYBIRD_SOURCE_DIR}/Build/${SERENITY_ARCH}/Root/usr/Ports" - -for file in $(git ls-files "${LADYBIRD_SOURCE_DIR}/Ports"); do - if [ "$(basename "$file")" != ".hosted_defs.sh" ]; then - target=${SERENITY_PORTS_DIR}/$(realpath --relative-to="${LADYBIRD_SOURCE_DIR}/Ports" "$file") - mkdir -p "$(dirname "$target")" && cp "$file" "$target" - fi -done diff --git a/Tests/LibJS/CMakeLists.txt b/Tests/LibJS/CMakeLists.txt index 301565f3d02..71075fc3dca 100644 --- a/Tests/LibJS/CMakeLists.txt +++ b/Tests/LibJS/CMakeLists.txt @@ -6,19 +6,11 @@ serenity_test(test-invalid-unicode-js.cpp LibJS LIBS LibJS LibLocale) serenity_test(test-value-js.cpp LibJS LIBS LibJS LibLocale) -serenity_component( - test262-runner - TARGETS test262-runner -) add_executable(test262-runner test262-runner.cpp) target_link_libraries(test262-runner PRIVATE LibJS LibCore LibLocale) serenity_set_implicit_links(test262-runner) install(TARGETS test262-runner RUNTIME DESTINATION bin OPTIONAL) -serenity_component( - test-test262 - TARGETS test-test262 -) add_executable(test-test262 test-test262.cpp) target_link_libraries(test-test262 PRIVATE LibMain LibCore LibFileSystem) serenity_set_implicit_links(test-test262) diff --git a/Userland/Services/ImageDecoder/CMakeLists.txt b/Userland/Services/ImageDecoder/CMakeLists.txt index c7c74a701a3..837be09228d 100644 --- a/Userland/Services/ImageDecoder/CMakeLists.txt +++ b/Userland/Services/ImageDecoder/CMakeLists.txt @@ -1,8 +1,3 @@ -serenity_component( - ImageDecoder - TARGETS ImageDecoder -) - compile_ipc(ImageDecoderServer.ipc ImageDecoderServerEndpoint.h) compile_ipc(ImageDecoderClient.ipc ImageDecoderClientEndpoint.h) diff --git a/Userland/Services/RequestServer/CMakeLists.txt b/Userland/Services/RequestServer/CMakeLists.txt index 2baaa5c2e7f..e4a4b01dd60 100644 --- a/Userland/Services/RequestServer/CMakeLists.txt +++ b/Userland/Services/RequestServer/CMakeLists.txt @@ -1,8 +1,3 @@ -serenity_component( - RequestServer - TARGETS RequestServer -) - compile_ipc(RequestServer.ipc RequestServerEndpoint.h) compile_ipc(RequestClient.ipc RequestClientEndpoint.h) diff --git a/Userland/Services/SQLServer/CMakeLists.txt b/Userland/Services/SQLServer/CMakeLists.txt index 7af579d07e7..7b73858fa75 100644 --- a/Userland/Services/SQLServer/CMakeLists.txt +++ b/Userland/Services/SQLServer/CMakeLists.txt @@ -1,9 +1,3 @@ -serenity_component( - SQLServer - REQUIRED - TARGETS SQLServer -) - compile_ipc(SQLServer.ipc SQLServerEndpoint.h) compile_ipc(SQLClient.ipc SQLClientEndpoint.h) diff --git a/Userland/Services/WebContent/CMakeLists.txt b/Userland/Services/WebContent/CMakeLists.txt index 226bfa8f52f..3d91dfda914 100644 --- a/Userland/Services/WebContent/CMakeLists.txt +++ b/Userland/Services/WebContent/CMakeLists.txt @@ -1,11 +1,5 @@ include(accelerated_graphics) -serenity_component( - WebContent - TARGETS WebContent - DEPENDS ImageDecoder RequestServer -) - compile_ipc(WebContentServer.ipc WebContentServerEndpoint.h) compile_ipc(WebContentClient.ipc WebContentClientEndpoint.h) diff --git a/Userland/Services/WebDriver/CMakeLists.txt b/Userland/Services/WebDriver/CMakeLists.txt index 9d5d0160559..74a7548c3eb 100644 --- a/Userland/Services/WebDriver/CMakeLists.txt +++ b/Userland/Services/WebDriver/CMakeLists.txt @@ -1,9 +1,3 @@ -serenity_component( - WebDriver - TARGETS WebDriver - DEPENDS WebContent -) - set(SOURCES Client.cpp Session.cpp diff --git a/Userland/Services/WebWorker/CMakeLists.txt b/Userland/Services/WebWorker/CMakeLists.txt index ca666b61dc2..f7f0294d0a9 100644 --- a/Userland/Services/WebWorker/CMakeLists.txt +++ b/Userland/Services/WebWorker/CMakeLists.txt @@ -1,9 +1,3 @@ -serenity_component( - WebWorker - TARGETS WebWorker - DEPENDS WebContent -) - set(SOURCES ConnectionFromClient.cpp DedicatedWorkerHost.cpp diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index cc942e51912..7a64f9964e7 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -1,73 +1,38 @@ -file(GLOB CMD_SOURCES CONFIGURE_DEPENDS "*.cpp") -list(APPEND REQUIRED_TARGETS - file -) -list(APPEND RECOMMENDED_TARGETS - aconv abench gzip lzcat tar unzip xzcat zip +set(CMD_SOURCES + abench.cpp + aconv.cpp + animation.cpp + gzip.cpp + headless-browser.cpp + icc.cpp + image.cpp + isobmff.cpp + js.cpp + lzcat.cpp + shred.cpp + sql.cpp + tar.cpp + test-jpeg-roundtrip.cpp + ttfdisasm.cpp + unzip.cpp + wasm.cpp + xml.cpp + xzcat.cpp + zip.cpp ) -# FIXME: Support specifying component dependencies for utilities (e.g. WebSocket for telws) - -foreach(CMD_SRC ${CMD_SOURCES}) +foreach(CMD_SRC IN LISTS CMD_SOURCES) get_filename_component(CMD_NAME ${CMD_SRC} NAME_WLE) - if (CMD_NAME IN_LIST SPECIAL_TARGETS) - set(TARGET_NAME "${CMD_NAME}-bin") - else() - set(TARGET_NAME "${CMD_NAME}") - endif() - if(CMD_NAME IN_LIST REQUIRED_TARGETS) - serenity_component( - ${CMD_NAME} - REQUIRED - TARGETS ${TARGET_NAME} - ) - elseif(CMD_NAME IN_LIST RECOMMENDED_TARGETS) - serenity_component( - ${CMD_NAME} - RECOMMENDED - TARGETS ${TARGET_NAME} - ) - else() - serenity_component( - ${CMD_NAME} - TARGETS ${TARGET_NAME} - ) - endif() - add_executable(${TARGET_NAME} ${CMD_SRC}) - target_link_libraries(${TARGET_NAME} PRIVATE LibCore LibMain) - serenity_set_implicit_links(${TARGET_NAME}) - set_target_properties(${TARGET_NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE) - install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin OPTIONAL) - - if (CMD_NAME IN_LIST SPECIAL_TARGETS) - install(CODE - "if (EXISTS ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME}-bin) - file(RENAME ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME}-bin ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME}) - endif()") - endif() + add_executable(${CMD_NAME} ${CMD_SRC}) + target_link_libraries(${CMD_NAME} PRIVATE LibCore LibMain) + serenity_set_implicit_links(${CMD_NAME}) + set_target_properties(${CMD_NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE) + install(TARGETS ${CMD_NAME} RUNTIME DESTINATION bin OPTIONAL) endforeach() -if (ENABLE_JAKT) - add_jakt_executable(hello-jakt - MAIN_SOURCE hello-world.jakt - ) - target_link_libraries(hello-jakt PRIVATE LibC) - set_target_properties(hello-jakt PROPERTIES EXCLUDE_FROM_ALL TRUE) - install(TARGETS hello-jakt RUNTIME DESTINATION bin OPTIONAL) - serenity_component( - hello-jakt - RECOMMENDED - TARGETS hello-jakt - ) -endif() - -install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/egrep SYMBOLIC)") -install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/fgrep SYMBOLIC)") -install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/rgrep SYMBOLIC)") install(CODE "file(CREATE_LINK gzip ${CMAKE_INSTALL_PREFIX}/bin/gunzip SYMBOLIC)") install(CODE "file(CREATE_LINK gzip ${CMAKE_INSTALL_PREFIX}/bin/zcat SYMBOLIC)") -install(CODE "file(CREATE_LINK /usr/lib/Loader.so ${CMAKE_INSTALL_PREFIX}/bin/ldd SYMBOLIC)") target_link_libraries(abench PRIVATE LibAudio LibFileSystem) target_link_libraries(aconv PRIVATE LibAudio LibFileSystem) @@ -91,13 +56,3 @@ target_link_libraries(zip PRIVATE LibArchive LibFileSystem) # FIXME: Link this file into headless-browser without compiling it again. target_sources(headless-browser PRIVATE "${SerenityOS_SOURCE_DIR}/Userland/Services/WebContent/WebDriverConnection.cpp") - -include("${SerenityOS_SOURCE_DIR}/Meta/Lagom/Fuzzers/fuzzers.cmake") - -foreach(name IN LISTS FUZZER_TARGETS) - set(fuzz_source_file "${SerenityOS_SOURCE_DIR}/Meta/Lagom/Fuzzers/Fuzz${name}.cpp") - target_sources(test-fuzz PRIVATE "${fuzz_source_file}") - set_source_files_properties("${fuzz_source_file}" PROPERTIES COMPILE_DEFINITIONS "LLVMFuzzerTestOneInput=Test${name}") - set_source_files_properties("${fuzz_source_file}" PROPERTIES COMPILE_OPTIONS "-Wno-missing-declarations") - target_link_libraries(test-fuzz PRIVATE "${FUZZER_DEPENDENCIES_${name}}") -endforeach()