Repository navigation
How to configure extra library dirs (for cross compilation)? #16178
|
Hello, I have a dependency that I want to statically link during cross compilation on Arch Linux to produce a Windows EXE. Now my question: Bonus question: where should I put cross compile files in my project tree? |
Replies: 3 comments
|
I ended up adding this to the [properties]
extra_lib_dir = '/usr/x86_64-w64-mingw32/static/lib'and this to the extra_lib_dir = meson.get_external_property('extra_lib_dir', [])
... = cc.find_library(..., dirs : extra_lib_dir)I don't feel like this is amazing because we need to pass in extra_lib_dir everywhere it could be required, but at least doing this allows me to get to feature parity with the old non-build-system. |
|
(I'm assuming that This might be what you want: Be aware that this will affect all calls to |
|
(And no, |
(I'm assuming that
-l:/path/to/odd/libis a typo and you meant-L/path/to/odd/lib)This might be what you want:
Be aware that this will affect all calls to
cc.find_library, even those where you would prefer to use the library in/usr/x86_64-w64-mingw32/libinstead of/usr/x86_64-w64-mingw32/static/lib.