-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for setting LIBDIR via env #35
Conversation
This looks great, thanks! Can you please document this in the build instructions in the |
Great. Since this is one atomic change (in my mind, the feature and its documentation belong together), can you please squash the commits. Thanks. |
Hardcoding the libdir as `${prefix}/lib` isn't correct for systems that keep 64-bit libraries in `${prefix}/lib64`. Allow setting a variable `LIBDIR` in the environment, to define both the pkg-config libdir and the path passed to cdylib_link_lines(). `LIBDIR` may be an absolute path or one based on `${prefix}`, which will be substituted before creating the PathBuf for cdylib_link_lines.
@nwalfield Done. Tangentially...There's also the ...I'm also wondering, given that RPM is the main consumer for this, whether it wouldn't make sense to generate a CMake configuration ( |
I've moved this issue to here: #36 |
Thanks for working on this! |
That PR, for the record: https://src.fedoraproject.org/rpms/rust-rpm-sequoia/pull-request/1 |
Hardcoding the libdir as
${prefix}/lib
isn't correct for systems that keep 64-bit libraries in${prefix}/lib64
.Allow setting a variable
LIBDIR
in the environment, to define both the pkg-config libdir and the path passed to cdylib_link_lines().LIBDIR
may be an absolute path or one based on${prefix}
, which will be substituted before creating the PathBuf for cdylib_link_lines.(Note that the
libdir
argument to cdylib_link_lines is actually only used on macos, so this won't actually have any effect on the linker args emitted on linux. Nevertheless, for the sake of completeness customLIBDIR
values based on${prefix}
are supported.)