Meta: Replace all use of LADYBIRD_PROJECT_ROOT with LADYBIRD_SOURCE_DIR

Those two are equivalent so no need to have two different variables.
This commit is contained in:
Undefine 2026-03-27 22:14:27 +01:00 committed by Andrew Kaster
parent 7c30746f15
commit b9e5c0e98c
6 changed files with 18 additions and 23 deletions

View file

@ -106,7 +106,7 @@ function(lagom_lib target_name fs_name)
add_lagom_library_install_rules(${target_name} ALIAS_NAME ${library})
if (ENABLE_INSTALL_HEADERS)
install(
DIRECTORY "${LADYBIRD_PROJECT_ROOT}/Libraries/Lib${library}"
DIRECTORY "${LADYBIRD_SOURCE_DIR}/Libraries/Lib${library}"
COMPONENT Lagom_Development
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
@ -196,7 +196,7 @@ function(ladybird_lib name fs_name)
endfunction()
macro(add_ladybird_subdirectory path)
add_subdirectory("${LADYBIRD_PROJECT_ROOT}/${path}" "${CMAKE_CURRENT_BINARY_DIR}/${path}")
add_subdirectory("${LADYBIRD_SOURCE_DIR}/${path}" "${CMAKE_CURRENT_BINARY_DIR}/${path}")
endmacro()
if (NOT TARGET ladybird_codegen_accumulator)

View file

@ -103,7 +103,7 @@ function(invoke_py_generator name script primary_source header implementation)
invoke_generator_impl(
${name}
"${LADYBIRD_PROJECT_ROOT}/Meta/${script}"
"${LADYBIRD_SOURCE_DIR}/Meta/${script}"
${primary_source}
${header}
${implementation}

View file

@ -24,12 +24,7 @@ if (POLICY CMP0174)
cmake_policy(SET CMP0174 NEW)
endif()
get_filename_component(
LADYBIRD_PROJECT_ROOT "${PROJECT_SOURCE_DIR}/../.."
ABSOLUTE CACHE
)
list(APPEND CMAKE_MODULE_PATH "${LADYBIRD_PROJECT_ROOT}/Meta/CMake")
list(APPEND CMAKE_MODULE_PATH "${LADYBIRD_SOURCE_DIR}/Meta/CMake")
if(NOT COMMAND ladybird_option)
macro(ladybird_option)
@ -132,7 +127,7 @@ set(Lagom_INSTALL_CMAKEDIR "${CMAKE_INSTALL_DATADIR}/${package}"
mark_as_advanced(Lagom_INSTALL_CMAKEDIR)
install(
FILES "${LADYBIRD_PROJECT_ROOT}/Meta/CMake/lagom-install-config.cmake"
FILES "${LADYBIRD_SOURCE_DIR}/Meta/CMake/lagom-install-config.cmake"
DESTINATION "${Lagom_INSTALL_CMAKEDIR}"
RENAME "${package}Config.cmake"
COMPONENT Lagom_Development
@ -197,14 +192,14 @@ endif()
# Lagom Libraries
# FIXME: Move these calls to the relevant client library CMakeLists
# Note that the Services themselves are only built if ENABLE_GUI_TARGETS, from top level.
compile_ipc(${LADYBIRD_PROJECT_ROOT}/Services/RequestServer/RequestClient.ipc Services/RequestServer/RequestClientEndpoint.h)
compile_ipc(${LADYBIRD_PROJECT_ROOT}/Services/RequestServer/RequestServer.ipc Services/RequestServer/RequestServerEndpoint.h)
compile_ipc(${LADYBIRD_PROJECT_ROOT}/Services/WebContent/WebContentServer.ipc Services/WebContent/WebContentServerEndpoint.h)
compile_ipc(${LADYBIRD_PROJECT_ROOT}/Services/WebContent/WebContentClient.ipc Services/WebContent/WebContentClientEndpoint.h)
compile_ipc(${LADYBIRD_PROJECT_ROOT}/Services/WebContent/WebDriverClient.ipc Services/WebContent/WebDriverClientEndpoint.h)
compile_ipc(${LADYBIRD_PROJECT_ROOT}/Services/WebContent/WebDriverServer.ipc Services/WebContent/WebDriverServerEndpoint.h)
compile_ipc(${LADYBIRD_PROJECT_ROOT}/Services/WebContent/WebUIClient.ipc Services/WebContent/WebUIClientEndpoint.h)
compile_ipc(${LADYBIRD_PROJECT_ROOT}/Services/WebContent/WebUIServer.ipc Services/WebContent/WebUIServerEndpoint.h)
compile_ipc(${LADYBIRD_SOURCE_DIR}/Services/RequestServer/RequestClient.ipc Services/RequestServer/RequestClientEndpoint.h)
compile_ipc(${LADYBIRD_SOURCE_DIR}/Services/RequestServer/RequestServer.ipc Services/RequestServer/RequestServerEndpoint.h)
compile_ipc(${LADYBIRD_SOURCE_DIR}/Services/WebContent/WebContentServer.ipc Services/WebContent/WebContentServerEndpoint.h)
compile_ipc(${LADYBIRD_SOURCE_DIR}/Services/WebContent/WebContentClient.ipc Services/WebContent/WebContentClientEndpoint.h)
compile_ipc(${LADYBIRD_SOURCE_DIR}/Services/WebContent/WebDriverClient.ipc Services/WebContent/WebDriverClientEndpoint.h)
compile_ipc(${LADYBIRD_SOURCE_DIR}/Services/WebContent/WebDriverServer.ipc Services/WebContent/WebDriverServerEndpoint.h)
compile_ipc(${LADYBIRD_SOURCE_DIR}/Services/WebContent/WebUIClient.ipc Services/WebContent/WebUIClientEndpoint.h)
compile_ipc(${LADYBIRD_SOURCE_DIR}/Services/WebContent/WebUIServer.ipc Services/WebContent/WebUIServerEndpoint.h)
add_ladybird_subdirectory(Libraries)

View file

@ -1,7 +1,7 @@
ladybird_test(test-value-js.cpp LibJS LIBS LibJS LibUnicode)
ladybird_testjs_test(test-js.cpp test-js LIBS LibGC)
set_tests_properties(test-js PROPERTIES ENVIRONMENT "LADYBIRD_SOURCE_DIR=${LADYBIRD_PROJECT_ROOT}")
set_tests_properties(test-js PROPERTIES ENVIRONMENT "LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR}")
if (NOT WIN32)
add_custom_target(test-js-bytecode ALL DEPENDS test-js "${CMAKE_BINARY_DIR}/bin/test-js-bytecode")
@ -11,7 +11,7 @@ if (NOT WIN32)
DEPENDS "${ladybird_SOURCE_DIR}/Tests/LibJS/test-js-bytecode.py"
)
add_test(NAME test-js-bytecode COMMAND "${CMAKE_BINARY_DIR}/bin/test-js-bytecode")
set_tests_properties(test-js-bytecode PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_PROJECT_ROOT})
set_tests_properties(test-js-bytecode PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR})
add_custom_target(test-js-ast ALL DEPENDS js "${CMAKE_BINARY_DIR}/bin/test-js-ast")
add_custom_command(
@ -20,5 +20,5 @@ if (NOT WIN32)
DEPENDS "${ladybird_SOURCE_DIR}/Tests/LibJS/test-js-ast.py"
)
add_test(NAME test-js-ast COMMAND "${CMAKE_BINARY_DIR}/bin/test-js-ast")
set_tests_properties(test-js-ast PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_PROJECT_ROOT})
set_tests_properties(test-js-ast PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR})
endif()

View file

@ -1,6 +1,6 @@
add_executable(test-wasm test-wasm.cpp)
target_link_libraries(test-wasm AK LibCore LibFileSystem JavaScriptTestRunnerMain LibTest LibWasm LibJS LibCrypto LibGC)
set(wasm_test_root "${LADYBIRD_PROJECT_ROOT}")
set(wasm_test_root "${LADYBIRD_SOURCE_DIR}")
if (INCLUDE_WASM_SPEC_TESTS)
set(wasm_test_root "${Lagom_BINARY_DIR}")
endif()

View file

@ -34,6 +34,6 @@ if (BUILD_TESTING)
)
set_tests_properties(LibWeb PROPERTIES
ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_PROJECT_ROOT}
ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR}
TIMEOUT_SIGNAL_NAME SIGTERM)
endif()