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

Why is this present in the cmake/install file? #20104

Open
MoBaT opened this issue Jan 24, 2025 · 0 comments
Open

Why is this present in the cmake/install file? #20104

MoBaT opened this issue Jan 24, 2025 · 0 comments

Comments

@MoBaT
Copy link

MoBaT commented Jan 24, 2025

Hey! I'm currently on a Mac machine and am building protobuf through ExternalProject_Add. My main project modifies the CMAKE_INSTALL_LIBDIR, so ideally I would love that propagated to the protoc executable instead of it being a hardcoded @loader_path/../lib. My question is, what is the purpose of this cmake code? Why is it hardcoded for mac machines?

https://github.com/protocolbuffers/protobuf/blob/main/cmake/install.cmake#L77

Image

In my application, I had to patch the protobuf repository to revert it back to use @loader_path/../${CMAKE_INSTALL_LIBDIR} instead of the hardcoded lib. The issue I was having was that I had another external repository use the protoc executable, however, since the libs did not exist in this location @loader_path/../lib, it was causing library load issues.

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

1 participant