Skip to content

meson: fix csound detection

csound-sys can detect the system lib using either pkg-config or using the CSOUND_LIB_DIR env variable. The former case just work but the second is trickier as we need to ensure that CSOUND_LIB_DIR is defined when building.

So we no longer try to detect the lib using find_library() if user didn't define the env variable as the build will fail later.

Also explicitly pass the env variable to cargo so user can now call 'CSOUND_LIB_DIR=/usr/lib64 meson build && ninja -C build' and have it work without repassing the env variable to ninja.

cc @ndufresne

Merge request reports