I'm generating some header files for one of my library using a python script. It is working fine and files are generated under math@sta. (value of @OUTPUT@) I wish to include them in another library, but math@sta does not seems to be added to the include list.
prg_genswizzle = find_program( 'genswizzle.py' )
gen_swizzle_code = generator( prg_genswizzle,
output : '@BASE...@swizzle.ipp',
arguments : ['@OUTPUT@', '@EXTRA_ARGS@', 'code'] )
vector2swizzle = gen_swizzle_code.process('vector2.hpp', extra_args : ['2'])
I've tried to add both '.' and current_build_dir, but the directory was not added:
incmath = include_directories( meson.current_build_dir(), '.' )
dep_math = declare_dependency(
include_directories : [incdir_engine,incmath],
link_with : [lib_math],
)
What am i missing ? Should I use meson.current_build_dir() + 'filename.hpp' during generation instead of OUTPUT?
What is the proper way to generate headers without any input dependency ? (In this case vector2.hpp is not required at all, it is just a placeholder)
I've found multiple solutions, but each requires an input
- generator
- configure_file (requires input too)
- custom_target
- run_command (not a good choice as invoked only during meson configuration)