mesonbuild/meson

Allow specifying dependency information in the cross-info file

Aperta

#1524 aperta il 27 mar 2017

 (5 commenti) (0 reazioni) (0 assegnatari)Python (1465 fork)batch import
crossenhancementhelp wantedmesa/wayland/xorg

Metriche repository

Star
 (4978 stelle)
Metriche merge PR
 (Merge medio 139g 13h) (51 PR mergiate in 30 g)

Descrizione

Ref. https://cgit.freedesktop.org/mesa/demos/commit/?h=meson&id=5671d1975c4c4a8457fc1664a188bbee22968d5a

pkg-config isn't always available, so we want a way to specify it in the cross-info file. A new field in the properties section makes sense:

[properties]
has_function_printf = true
dependency_glew_libs = ['-L/path/to/glew/lib/', '-lglew32']
dependency_glew_cflags = ['-I/path/to/glew/include']

This has exactly the same semantics as pkg-config Libs: and Cflags: fields.

We would, as always, automatically translate this to per-compiler arguments.

@TingPing had the idea of also being able to specify this dependency information in the form of a dependency-file which would put all this into a separate file 'template' which would allow it to be shared across cross-info files, and would also allow it to be used for native builds. Let's discuss that in a different issue.

Guida contributor