Skip to content

Another round of CMake improvements#8

Open
adriaandegroot wants to merge 9 commits intofredldotme:masterfrom
adriaandegroot:personal/adridg/cmake3
Open

Another round of CMake improvements#8
adriaandegroot wants to merge 9 commits intofredldotme:masterfrom
adriaandegroot:personal/adridg/cmake3

Conversation

@adriaandegroot
Copy link

@adriaandegroot adriaandegroot commented Feb 19, 2026

Note: MR in-progress, still needs tweaks. I know I keep picking at this, even though it feels like it should be done already.

This massages the CMake files again, so that they do install one copy of the headers per Qt version. The reason to do this is Linux distro's that ship separate -dev packages which also ship multiple copies of this library that are compiled for different Qt versions (e.g. qwebdavlib-qt5 and qwebdavlib-qt6). There are two separate -dev packages, which depend on the respective library packages. Those obviously can't install headers to the same location, so just do the thing upstream, even if it feels like "this is just duplicating files on the target system".

OTOH, why would you want a Qt5 version of this anymore.

It should be possible to build a specific (Qt5 or 6) version of the library
in the presence of both, without automatically finding both. There's
CMake machinery for this already (CMAKE_DISABLE_FIND_PACKAGE_*) but
that is hard-to-find and sometimes difficult to spell.
This avoids confusing cmake-time errors from subdirectories
that can't use Qt facilities then.
Don't install all headers, though (as previously with CMake),
leave private and unnecessary ones out.
When building as part of QWebdav, we need a different way
to get the library alias (preferring Qt6).
CMake-based build places them in
	/usr/include/qt6/qwebdav-qt6/
QMake-based build places them in
	/usr/include/x86_64-linux-gnu/qt6/qwebdav-qt6

This may also be a triple (on the part of qmake) to help support
multiple architectures binaries packaged and installed on the same host.
Tweaking it is outside the scope of this MR.
@adriaandegroot
Copy link
Author

Note: This is a MR in-progress. There's still some tricksy bits with getting the right headers in the right places from the resulting QWebdav6Config.cmake, and there's another issue with ECM not wanting to install headers to a tripleted location.

@fredldotme
Copy link
Owner

Let me know when this is ready.

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

Successfully merging this pull request may close these issues.

2 participants