Skip to content
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

Support CMAKE_INSTALL_LIBDIR ? #4695

Open
CyberShadow opened this issue Jul 3, 2024 · 1 comment
Open

Support CMAKE_INSTALL_LIBDIR ? #4695

CyberShadow opened this issue Jul 3, 2024 · 1 comment

Comments

@CyberShadow
Copy link
Contributor

Hi,

It would be nice to be able to specify cmake -DCMAKE_INSTALL_LIBDIR=/some/path/..., so that the libraries are installed into a directory that's separate from the compiler binaries.

I don't think that's possible to do right now - I see a lot of explicit mentions of ${CMAKE_INSTALL_PREFIX}/lib.

I'm hoping that this will make it easier to package LDC so that the shared libraries can be a separate package, which don't depend on the compiler (which itself depends on LLVM which is quite heavy), e.g. NixOS/nixpkgs#324306.

@kinke
Copy link
Member

kinke commented Jul 4, 2024

There is a CMAKE_INSTALL_LIBDIR variable in https://github.com/ldc-developers/ldc/blob/master/runtime/CMakeLists.txt#L50 (overriding a user-specified one ATM), but it's only used for the rpath and the ldc2.conf file, not as install destination dir. The multilib stuff complicates matters (MULTILIB_SUFFIX).

Another potential route is to build the shared libs separately using the ldc-build-runtime tool, and specifying a suited CMAKE_INSTALL_PREFIX for that build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants