Use JINJA_FILE_SEARCHPATH variable so the fonts will also be found when built as a library.

This commit is contained in:
Patrick 2025-03-28 14:53:36 +01:00
parent 71a268b5ad
commit d74474a042
4 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,7 @@ Import('env')
public_dir = env.Dir('public') public_dir = env.Dir('public')
env.Append(CPPPATH = [public_dir]) env.Append(CPPPATH = [public_dir])
env.Append(JINJA_FILE_SEARCHPATH = [env.Dir('.')])
if env['BUILD_TYPE'] in ('release', 'release_debug', 'profile'): if env['BUILD_TYPE'] in ('release', 'release_debug', 'profile'):
env.Append(CPPDEFINES = ['RAID_RELEASE']) env.Append(CPPDEFINES = ['RAID_RELEASE'])
env = env.Module('private/raid/SModule') env = env.Module('private/raid/SModule')

@ -1 +1 @@
Subproject commit 2769fd801fa456d809e9e7c8bf2d1be4953a734d Subproject commit 9436d2c48d91dc104099d8805c696a85d7bd37f2

View File

@ -3,5 +3,5 @@
namespace raid namespace raid
{ {
extern const std::array<std::uint8_t, NOTO_SANS_SIZE> NOTO_SANS_DATA = { {{ file_content_hex('#res/fonts/NotoSans-Regular.ttf') }} }; extern const std::array<std::uint8_t, NOTO_SANS_SIZE> NOTO_SANS_DATA = { {{ file_content_hex('res/fonts/NotoSans-Regular.ttf') }} };
} }

View File

@ -9,7 +9,7 @@
namespace raid 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<std::uint8_t, NOTO_SANS_SIZE> NOTO_SANS_DATA; extern const std::array<std::uint8_t, NOTO_SANS_SIZE> NOTO_SANS_DATA;
} // namespace raid } // namespace raid