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

Use GNUInstallDirs in CMake for install flexibility #1563

Closed
eliasdaler opened this issue Feb 24, 2019 · 5 comments
Closed

Use GNUInstallDirs in CMake for install flexibility #1563

eliasdaler opened this issue Feb 24, 2019 · 5 comments

Comments

@eliasdaler
Copy link
Contributor

Right now, we have a lot of folders hard coded for install rules here. I think that for that, we can use GNUInstallDirs module which sets a lot of sensible defaults which can easily be redefined as needed, e.g. if you want libraries to go to some other place than ${CMAKE_INSTALL_PREFIX}/lib, you'll be able to set ${CMAKE_INSTALL_LIBDIR}.

This will make lives of our *BSD folks easier, plus it will allow users of some unconventional distros to be able to configure install directories as they want.

Thoughts?

(Related to #189, #1561, #1510)

@LaurentGomila
Copy link
Member

We're happily using that at work to simplify the install configuration. It works fine for our needs on Windows/Linux/MacOS.

@eXpl0it3r eXpl0it3r added this to Discussion in SFML 2.6.0 via automation Feb 24, 2019
@eXpl0it3r eXpl0it3r added this to the 2.6 milestone Feb 24, 2019
@JonnyPtn
Copy link
Contributor

Should be a pretty straightforward change, just need to clarify which variables should be used for what. So I think these are the ones we want to replace, and my suggested replacements. Once the SFML team confirm these a PR can be done pretty quickly

  • lib replace with CMAKE_INSTALL_LIBDIR
  • SFML_DEPENDENCIES_INSTALL_PREFIX : replace with CMAKE_INSTALL_LIBDIR
  • SFML_MISC_INSTALL_PREFIX: replace with
    • CMAKE_INSTALL_INFODIR for the license/readme
    • CMAKE_INSTALL_DOCDIR for the docs
  • bin: replace with CMAKE_INSTALL_BINDIR

Not sure what we should do with SFML_PKGCONFIG_INSTALL_PREFIX?

@eliasdaler
Copy link
Contributor Author

I think for pkg-config files, it'll be good to use ${CMAKE_INSTALL_LIBDIR}/pkgconfig as the default, but still make it configurable (right now, I have lots of *.pc files in /usr/local/lib/pkgconfig and in /usr/lib/...)

@eXpl0it3r
Copy link
Member

Don't forget the considerations that were taken into account for the current PKGCONFIG setup in #1433 / #1466 and others. 😉

@eXpl0it3r eXpl0it3r moved this from Discussion to Review & Testing in SFML 2.6.0 Apr 13, 2019
@eXpl0it3r eXpl0it3r moved this from Review & Testing to Ready in SFML 2.6.0 Jul 1, 2019
@eXpl0it3r
Copy link
Member

Fixed with #1576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SFML 2.6.0
  
Done
Development

No branches or pull requests

5 participants