1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

Meta: Create Build/lagom/Root/res with resources for lagom binaries

This way, build files can install things into
`${CMAKE_BINARY_DIR}/Root/res/` and it'll work in both serenity and
lagom builds.

It allows using a single `Core::ResourceImplementation::install()`
call to install both checked-in and generated files (as long as both
get copied into this new build-time staging dir).

No behavior change.
This commit is contained in:
Nico Weber 2024-01-30 09:24:31 -05:00 committed by Andrew Kaster
parent aa07c232f1
commit d1036c915d

View file

@ -418,6 +418,28 @@ if (BUILD_LAGOM_TOOLS)
endif()
if (BUILD_LAGOM)
# Create lagom equivalent of Serenity's Build/foo/Root/res (which for Serenity becomes /res in the disk image).
# FIXME: Add more files as needed.
set(LAGOM_RES "${Lagom_BINARY_DIR}/Root/res")
file(MAKE_DIRECTORY "${LAGOM_RES}/fonts")
foreach(font
LiberationMono-Bold.ttf
LiberationMono-BoldItalic.ttf
LiberationMono-Italic.ttf
LiberationMono-Regular.ttf
LiberationSans-Bold.ttf
LiberationSans-BoldItalic.ttf
LiberationSans-Italic.ttf
LiberationSans-Regular.ttf
LiberationSerif-Bold.ttf
LiberationSerif-BoldItalic.ttf
LiberationSerif-Italic.ttf
LiberationSerif-Regular.ttf
)
configure_file("${SERENITY_PROJECT_ROOT}/Base/res/fonts/${font}" "${LAGOM_RES}/fonts/${font}" COPYONLY)
endforeach()
# Lagom Libraries
set(lagom_standard_libraries
AccelGfx