Set meson level options in cross file
Opened this issue · 4 comments
A common complaint I get is "I want to cross compile, but then the default directories are wrong for my distro!"
This is rather hard to handle in a generic way because where something goes (on Linux at least) is very much distro specific. take libdir:
Fedora has /lib64 for x86_64 libraries, and /lib32 for x86 libraries
Arch has /lib for x86_64 libraries, and /lib32 for x86 libraries
Debian has /lib/x86_64-linux-gnu and /lib/i386-linux-gnu (and additional madness)
Fortunately we have a way to provide meson information about cross compiling in the form of a cross file. It's already possible to provide language arguments this way, so setting default directories seems like an equally valid thing to do.
Should that enable setting any option or only build dirs?
I'm going to start with meson level options and go from there.
I think this more of a superset of that bug. But I've added a fixes tag for that issue to the commit that issue.