qt,build: Install headers for Qt 5 and Qt 6 in different locations

* lang/qt/src/Makefile.am (includeprefix): New.
(qgpgmeincludedir, camelcaseincludedir): Add $(includeprefix).
(QGpgmeConfig.cmake, QGpgmeQt6Config.cmake): Add $(includeprefix) to
replacement for @resolved_includedir@.
--

This installs the headers for Qt 5 in $(includedir)/qgpgme-qt5 and the
headers for Qt 6 in $(includedir)/qgpgme-qt6. For users of the CMake
files the change will be transparent, i.e. they don't have to do
anything. Packagers will have to change their scripts but in the end
this change will make their lifes easier.

GnuPG-bug-id: 7161
This commit is contained in:
Ingo Klöcker 2024-06-17 11:44:36 +02:00
parent 53c367629a
commit 09827ffc77
No known key found for this signature in database
GPG Key ID: F5A5D1692277A1E9
2 changed files with 14 additions and 6 deletions

2
NEWS
View File

@ -14,6 +14,8 @@ Noteworthy changes in version 1.24.0 (unrelease)
* cpp: Provide information about designated revocation keys for a Key. * cpp: Provide information about designated revocation keys for a Key.
[T7118] [T7118]
* qt: Install headers for Qt 5 and Qt 6 in separate folders. [T7161]
* qt: Allow reading the data to decrypt/encrypt/sign/verify directly from * qt: Allow reading the data to decrypt/encrypt/sign/verify directly from
files. [T6550] files. [T6550]

View File

@ -319,9 +319,15 @@ qgpgme_moc_sources = \
gpgcardjob.moc \ gpgcardjob.moc \
qgpgmegpgcardjob.moc qgpgmegpgcardjob.moc
qgpgmeincludedir = $(includedir)/qgpgme if WANT_QT5
includeprefix = qgpgme-qt5
endif
if WANT_QT6
includeprefix = qgpgme-qt6
endif
qgpgmeincludedir = $(includedir)/$(includeprefix)/qgpgme
qgpgmeinclude_HEADERS = $(qgpgme_headers) qgpgmeinclude_HEADERS = $(qgpgme_headers)
camelcaseincludedir = $(includedir)/QGpgME camelcaseincludedir = $(includedir)/$(includeprefix)/QGpgME
camelcaseinclude_HEADERS = $(camelcase_headers) camelcaseinclude_HEADERS = $(camelcase_headers)
nodist_qgpgmeinclude_HEADERS = qgpgme_version.h nodist_qgpgmeinclude_HEADERS = qgpgme_version.h
@ -363,12 +369,12 @@ if HAVE_W32_SYSTEM
QGpgmeConfig.cmake: QGpgmeConfig-w32.cmake.in QGpgmeConfig.cmake: QGpgmeConfig-w32.cmake.in
sed -e 's|[@]resolved_bindir@|$(bindir)|g' < "$<" | \ sed -e 's|[@]resolved_bindir@|$(bindir)|g' < "$<" | \
sed -e 's|[@]resolved_libdir@|$(libdir)|g' | \ sed -e 's|[@]resolved_libdir@|$(libdir)|g' | \
sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@ sed -e 's|[@]resolved_includedir@|$(includedir)/$(includeprefix)|g' > $@
else else
QGpgmeConfig.cmake: QGpgmeConfig.cmake.in QGpgmeConfig.cmake: QGpgmeConfig.cmake.in
sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \ sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \
sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \ sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \
sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@ sed -e 's|[@]resolved_includedir@|$(includedir)/$(includeprefix)|g' > $@
endif endif
endif endif
if WANT_QT6 if WANT_QT6
@ -376,12 +382,12 @@ if HAVE_W32_SYSTEM
QGpgmeQt6Config.cmake: QGpgmeQt6Config-w32.cmake.in QGpgmeQt6Config.cmake: QGpgmeQt6Config-w32.cmake.in
sed -e 's|[@]resolved_bindir@|$(bindir)|g' < "$<" | \ sed -e 's|[@]resolved_bindir@|$(bindir)|g' < "$<" | \
sed -e 's|[@]resolved_libdir@|$(libdir)|g' | \ sed -e 's|[@]resolved_libdir@|$(libdir)|g' | \
sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@ sed -e 's|[@]resolved_includedir@|$(includedir)/$(includeprefix)|g' > $@
else else
QGpgmeQt6Config.cmake: QGpgmeQt6Config.cmake.in QGpgmeQt6Config.cmake: QGpgmeQt6Config.cmake.in
sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \ sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \
sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \ sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \
sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@ sed -e 's|[@]resolved_includedir@|$(includedir)/$(includeprefix)|g' > $@
endif endif
endif endif