2022-07-04 22:22:01 +02:00
|
|
|
fs = import('fs')
|
|
|
|
|
2021-01-30 18:02:18 +01:00
|
|
|
respack = find_program(meson.project_source_root() / 'tools/respack.py')
|
2017-11-15 17:25:11 +01:00
|
|
|
|
|
|
|
resrc = [
|
|
|
|
custom_target('bitmap.{cpp,h}',
|
2019-01-30 22:58:31 +01:00
|
|
|
command: [respack, '@INPUT@', '@OUTPUT@'],
|
|
|
|
input: files('../bitmaps/manifest.respack'),
|
|
|
|
output: ['bitmap.cpp', 'bitmap.h'])
|
2017-11-15 17:25:11 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
conf_platform_json = configure_file(input: 'default_config_platform.json.in',
|
2019-01-30 22:58:31 +01:00
|
|
|
output: '@BASENAME@',
|
|
|
|
configuration: conf_platform)
|
2017-11-15 17:25:11 +01:00
|
|
|
|
|
|
|
if host_machine.system() == 'darwin'
|
2022-07-04 22:22:01 +02:00
|
|
|
resmanifest = 'manifest_osx.respack'
|
2017-11-15 17:25:11 +01:00
|
|
|
else
|
2022-07-04 22:22:01 +02:00
|
|
|
resmanifest = 'manifest.respack'
|
2017-11-15 17:25:11 +01:00
|
|
|
endif
|
|
|
|
|
2022-07-04 22:22:01 +02:00
|
|
|
resmanifest_files = [conf_platform_json]
|
|
|
|
# Filter out the files we've generated ourselves
|
|
|
|
foreach rfile : fs.read(resmanifest).strip().split('\n')
|
|
|
|
rfile_s = rfile.strip()
|
|
|
|
if fs.is_file(rfile_s)
|
|
|
|
resmanifest_files += files(rfile_s)
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
resrc += custom_target('default_config.{cpp,h}',
|
|
|
|
command: [respack, '@INPUT0@', '@OUTPUT@'],
|
2022-07-07 10:33:36 +02:00
|
|
|
input: [files(resmanifest)],
|
|
|
|
depend_files: resmanifest_files,
|
2022-07-04 22:22:01 +02:00
|
|
|
output: ['default_config.cpp', 'default_config.h'])
|
|
|
|
|
2017-11-15 17:25:11 +01:00
|
|
|
|
|
|
|
libresrc_inc = include_directories('.')
|
2019-02-17 18:29:23 +01:00
|
|
|
libresrc = static_library('resrc', 'libresrc.cpp', resrc, include_directories: deps_inc, dependencies: deps)
|