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

Fix installation path for shared objects #581

Merged
merged 1 commit into from
Apr 5, 2017
Merged

Fix installation path for shared objects #581

merged 1 commit into from
Apr 5, 2017

Conversation

karol-szuster
Copy link
Contributor

There is no way to reliably configure installation path for shared
objects. It looks like this should be configurable by setting
CMAKE_LIBRARY_PATH but this approach doesn't work as intended.
Moreover, according to cmake docs, purpose of this variable is slightly
different.
With this patch it should be possible to configure where all libs should
go by setting STLINK_LIBRARY_PATH to either /usr/lib or /usr/lib64
(/usr/lib64 is new default value assuming that most users run 64bit
systems).

@xor-gate
Copy link
Member

xor-gate commented Apr 3, 2017

This will break on non-linux systems, MinGW, Cygwin, OS X, BSD etcetera. Probably the library path should be injected during build by commandline arguments by distro maintainers instead of hardcoding /usr/lib64.

@xor-gate xor-gate self-requested a review April 3, 2017 21:08
Copy link
Member

@xor-gate xor-gate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding just for one platform is really just a bad idea, we have to come up with a better solution.

On 64bit linux all shared objects should go to /usr/lib64. With this
path package maintainters should be able to override library path by
setting STLINK_LIBRARY_PATH.
@karol-szuster
Copy link
Contributor Author

I have updated this pull request. It should now behave exactly as before with only one small change. Package maintainers should now be able to override library path using STLINK_LIBRARY_PATH variable.

@xor-gate
Copy link
Member

xor-gate commented Apr 5, 2017

Looks good, but probably you should use option() for this.

@xor-gate
Copy link
Member

xor-gate commented Apr 5, 2017

Thank you!

@xor-gate xor-gate merged commit 47ab290 into stlink-org:master Apr 5, 2017
@xor-gate xor-gate added this to the v1.3.2 milestone Apr 5, 2017
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants