From d74474a0428afa4f55549cbbdf41c01c71a81475 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Fri, 28 Mar 2025 14:53:36 +0100 Subject: [PATCH] Use JINJA_FILE_SEARCHPATH variable so the fonts will also be found when built as a library. --- SModule | 1 + external/scons-plus-plus | 2 +- private/raid/fonts.gen.cpp.jinja | 2 +- private/raid/fonts.gen.hpp.jinja | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SModule b/SModule index 1113fb1..a1d7c58 100644 --- a/SModule +++ b/SModule @@ -3,6 +3,7 @@ Import('env') public_dir = env.Dir('public') env.Append(CPPPATH = [public_dir]) +env.Append(JINJA_FILE_SEARCHPATH = [env.Dir('.')]) if env['BUILD_TYPE'] in ('release', 'release_debug', 'profile'): env.Append(CPPDEFINES = ['RAID_RELEASE']) env = env.Module('private/raid/SModule') diff --git a/external/scons-plus-plus b/external/scons-plus-plus index 2769fd8..9436d2c 160000 --- a/external/scons-plus-plus +++ b/external/scons-plus-plus @@ -1 +1 @@ -Subproject commit 2769fd801fa456d809e9e7c8bf2d1be4953a734d +Subproject commit 9436d2c48d91dc104099d8805c696a85d7bd37f2 diff --git a/private/raid/fonts.gen.cpp.jinja b/private/raid/fonts.gen.cpp.jinja index 1aee6a9..20cee83 100644 --- a/private/raid/fonts.gen.cpp.jinja +++ b/private/raid/fonts.gen.cpp.jinja @@ -3,5 +3,5 @@ namespace raid { -extern const std::array NOTO_SANS_DATA = { {{ file_content_hex('#res/fonts/NotoSans-Regular.ttf') }} }; +extern const std::array NOTO_SANS_DATA = { {{ file_content_hex('res/fonts/NotoSans-Regular.ttf') }} }; } \ No newline at end of file diff --git a/private/raid/fonts.gen.hpp.jinja b/private/raid/fonts.gen.hpp.jinja index 8ce74d7..9397038 100644 --- a/private/raid/fonts.gen.hpp.jinja +++ b/private/raid/fonts.gen.hpp.jinja @@ -9,7 +9,7 @@ namespace raid { -inline constexpr std::size_t NOTO_SANS_SIZE = {{ file_size('#res/fonts/NotoSans-Regular.ttf' )}}; +inline constexpr std::size_t NOTO_SANS_SIZE = {{ file_size('res/fonts/NotoSans-Regular.ttf' )}}; extern const std::array NOTO_SANS_DATA; } // namespace raid