From 4eb685d94e89a2aef61047225c1834a89de01de2 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 28 Oct 2020 13:13:57 +0200 Subject: Simplify rcc - drop qrc parsing and zstd compression --- meson.build | 46 +++++----------------------------------------- 1 file changed, 5 insertions(+), 41 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index dac9ca6..a4b0c6e 100644 --- a/meson.build +++ b/meson.build @@ -1,49 +1,13 @@ -project('libembed', ['cpp'], - version: '0.1', - default_options: ['cpp_std=c++2a', 'warning_level=3'], -) - -libzstd = dependency('libzstd') - -libembed_sourceset = import('sourceset').source_set() -libembed_sourceset.add(when: libzstd, if_true: [ libzstd, files('lib/zstd.cpp') ] ) -libembed_conf = libembed_sourceset.apply(configuration_data()) - -libembed = library('embed', libembed_conf.sources(), - dependencies: libembed_conf.dependencies() -) - -libembed_dep = declare_dependency( - link_with: libembed, - include_directories: include_directories('lib/') +project('rcc', [], + version: '0.1.0', + license: 'BSD-2-Clause', ) prog_python = import('python').find_installation('python3') - rcc = generator(prog_python, output: '@BASENAME@.h', arguments: [ meson.current_source_dir()/'rcc', '--output=@OUTPUT@', '@EXTRA_ARGS@', '@INPUT@' ] ) -if not meson.is_subproject() -resources_h = rcc.process(files('test/resources.xrc'), extra_args: [ '--namespace=staticdata', '-' ]) - -zstd_dictionary = custom_target('zstd_dictionary', - output: 'zstd_dict', - input: 'rcc', - command: [ prog_python, '@INPUT@', 'Zstd', '--train=@OUTPUT@', files('test/resources.xrc') ] -) - -zstd_resources_h = custom_target('zstd_resources.h', - output: 'zstd_resources.h', - input: [ 'rcc', zstd_dictionary ], - command: [prog_python, '@INPUT0@', '--namespace=zstd_data', '--output=@OUTPUT@', 'Zstd', '--dict=@INPUT1@', files('test/resources.xrc')], -) - -test('libembed', - executable('embed', - sources: [ 'test/main.cpp', resources_h, zstd_resources_h ], - dependencies: [ libembed_dep ] - ) -) -endif # meson.is_subproject() +# example usage: +#rcc.process(files('res/a.svg'), extra_args: [ '--namespace=svg', 'dump' ]) -- cgit v1.2.1