The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
781 B
22 lines
781 B
project('generated header dep', 'c') |
|
|
|
# Regression test case for a very specific case: |
|
# - Uses both_libraries(), or library() with default_library=both. |
|
# - A header file is generated by a custom_target() and passed as source. |
|
# - A C file that uses that header is passed as a declare_dependency() source. |
|
# Under those specific conditions, the static library used to miss an order |
|
# dependency on the header file. This happened in GLib: |
|
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2917. |
|
|
|
python = import('python').find_installation() |
|
header = custom_target( |
|
output: 'foo.h', |
|
capture: true, |
|
command: [python, '-c', 'print("#define FOO")'], |
|
) |
|
|
|
sources_dep = declare_dependency(sources: files('foo.c')) |
|
|
|
both_libraries('foo', header, |
|
dependencies: sources_dep, |
|
)
|
|
|