mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
Meta+Libraries+AK: Append Cxx to imported library module names in swift
At the same time, simplify CMakeLists magic for libraries that want to include Swift code in the library. The Lib-less name of the library is now always the module name for the library with any Swift additions, extensions, etc. All vfs overlays now live in a common location to make finding them easier from CMake functions. A new pattern is needed for the Lib-less modules to re-export their Cxx counterparts.
This commit is contained in:
parent
f27d638e0a
commit
c5153cb398
Notes:
github-actions[bot]
2024-08-27 23:23:23 +00:00
Author: https://github.com/ADKaster
Commit: c5153cb398
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1200
13 changed files with 68 additions and 80 deletions
|
@ -29,14 +29,22 @@ function(generate_clang_module_map target_name)
|
|||
set(MODULE_MAP_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
|
||||
string(REPLACE "Lib" "" module_name ${target_name})
|
||||
set(module_name "${module_name}Cxx")
|
||||
|
||||
set(module_map_file "${CMAKE_CURRENT_BINARY_DIR}/module/module.modulemap")
|
||||
set(vfs_overlay_file "${CMAKE_CURRENT_BINARY_DIR}/vfs_overlay.yaml")
|
||||
set(vfs_overlay_file "${VFS_OVERLAY_DIRECTORY}/${target_name}_vfs_overlay.yaml")
|
||||
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
# FIXME: Make this depend on the public headers of the target
|
||||
add_custom_command(
|
||||
OUTPUT "${module_map_file}"
|
||||
COMMAND "${Python3_EXECUTABLE}" "${SerenityOS_SOURCE_DIR}/Meta/generate_clang_module_map.py" "${MODULE_MAP_DIRECTORY}" --module-map "${module_map_file}" --vfs-map ${vfs_overlay_file} ${MODULE_MAP_GENERATED_FILES}
|
||||
COMMAND "${Python3_EXECUTABLE}" "${SerenityOS_SOURCE_DIR}/Meta/generate_clang_module_map.py"
|
||||
"${MODULE_MAP_DIRECTORY}"
|
||||
--module-name "${module_name}"
|
||||
--module-map "${module_map_file}"
|
||||
--vfs-map ${vfs_overlay_file}
|
||||
${MODULE_MAP_GENERATED_FILES}
|
||||
VERBATIM
|
||||
DEPENDS "${SerenityOS_SOURCE_DIR}/Meta/generate_clang_module_map.py"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue