Use ctpp2c to generate template from source instead of use generated one.

Fixes #50.
This commit is contained in:
Matthieu Gautier
2017-07-12 15:45:44 +02:00
parent 6da3604df6
commit 64cc69f6ae
7 changed files with 173 additions and 12 deletions

View File

@ -1,7 +1,19 @@
ctpp2c = find_program('ctpp2c')
search_result_template = custom_target('result_template',
input: 'results.tmpl',
output: 'results.ct2',
command: [intermediate_ctpp2c, ctpp2c, '@INPUT@', '@OUTPUT@']
)
lib_resources = custom_target('resources',
input: 'resources_list.txt',
output: ['kiwixlib-resources.cpp', 'kiwixlib-resources.h'],
command:[res_compiler, '--cxxfile', '@OUTPUT0@', '--hfile', '@OUTPUT1@', '@INPUT@']
)
command:[res_compiler,
'--cxxfile', '@OUTPUT0@',
'--hfile', '@OUTPUT1@',
'--source_dir', '@OUTDIR@',
'@INPUT@'],
depends: [search_result_template]
)