From d1036c915da14c8dffc3be9001536b63a55fbfed Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 30 Jan 2024 09:24:31 -0500 Subject: [PATCH] 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. --- Meta/Lagom/CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 9a7dec6904..d1bd533a97 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -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