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 GNUInstallDirs in CmakeLists.txt? #17

Closed
sten0 opened this issue Jan 31, 2020 · 9 comments
Closed

support GNUInstallDirs in CmakeLists.txt? #17

sten0 opened this issue Jan 31, 2020 · 9 comments

Comments

@sten0
Copy link

sten0 commented Jan 31, 2020

Hi @Martchus,

I had to implement a workaround for the absence of GNUInstallDirs support. How do you feel about adding support for this, for non-Darwin unix-like systems? This also applies to qtutilities and Syncthing Tray, and IIRC it will make maintaining the Plasma integration easier and less error-prone, because IIRC various distro-level Debian build helpers require it. Asking to support it is also something we're supposed to ask for (in Debian), so there's also that ;-)

Best,
Nicholas

@Martchus
Copy link
Owner

I need to check what GNUInstallDirs actually does. Note that the current installation "layout" and its options for configuration was so far sufficient to package for different distributions, e.g. Arch Linux and openSUSE. I'm wondering what special requirements you have?

@Martchus
Copy link
Owner

I've been remembering that module again. When I've came across the module the first time it wasn't working like I'd expect as an Arch Linux user so I didn't consider using it.

This has now been fixed. The lib64 default for 64-bit looks still a little bit odd to me and making now suddenly use of it would break existing build scripts for my project. So I guess I'll use that module but still keep lib as default. Distributions which use something else can set CMAKE_INSTALL_LIBDIR. Note that you can already set the custom variables LIB_SUFFIX, LIB_SUFFIX_32 and LIB_SUFFIX_64.

Martchus added a commit that referenced this issue Jan 31, 2020
Martchus added a commit to Martchus/qtutilities that referenced this issue Jan 31, 2020
@sten0
Copy link
Author

sten0 commented Feb 2, 2020 via email

@sten0
Copy link
Author

sten0 commented Feb 2, 2020 via email

@Martchus
Copy link
Owner

Martchus commented Feb 2, 2020

Out of curiousity, does Arch support multiarch and/or cross-compilation,
and if so, does it use a different method?

32-bit libraries for use on a 64-bit system are provided by Arch and go under lib32. Cross compilation packages provided by the Arch community install the libraries built for the target architecture within a completely different prefix. There's also a good reason to do that when cross compiling:

Note that include dir does not contain the triplet part. This may cause problems if your library has arch-specific header files.

(Quote from the Debian Wiki page you've mentioned.)

Not sure who uses lib64 but judging by the implementation of GNUInstallDirs it is less specific than the Debian case.

@Martchus
Copy link
Owner

This is implemented now. Let me know if something is missing.

@kapsh
Copy link

kapsh commented Mar 9, 2020

@Martchus Hi! It seems to me that you've missed a couple of places in AppTarget.cmake. Variables DESKTOP_FILES, ICON_FILES are still using literal share. Mind checking that please?

Martchus added a commit that referenced this issue Mar 9, 2020
@Martchus
Copy link
Owner

Martchus commented Mar 9, 2020

I've fixed the hopefully last remaining hard-coded paths.

@kapsh
Copy link

kapsh commented Mar 9, 2020

Thanks! Everything is in order now.

A little explanation: without that tageditor's icon wound up in /usr/x86_64-pc-linux-gnu/share/icons/hicolor/scalable/apps/tageditor.svg on Exherbo Linux. In this distribution CMAKE_INSTALL_PREFIX is usually set to /usr/<triplet> and used for architecture dependent files (binaries usually). Platform independent parts (icons, docs, etc.) are supposed to use CMAKE_INSTALL_DATAROOTDIR.

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

3 participants