From 576d2db9dd9b7c66686e239ff61ffca606ad9f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Wed, 17 Jul 2024 12:02:03 +0200 Subject: [PATCH] build,qt: Decouple (un)install of CMake files * lang/qt/src/Makefile.am (install-cmake-files): Rename target to install-cmake-files-qt5 and install-cmake-files-qt6. (uninstall-cmake-files): Rename target to uninstall-cmake-files-qt5 and uninstall-cmake-files-qt6. (install_cmake_files_qt5, uninstall_cmake_files_qt5, install_cmake_files_qt6, uninstall_cmake_files_qt6): New variables. (install-data-local): Depend on both install-cmake-files-qt* targets. (uninstall-local): Depend on both uninstall-cmake-files-qt* targets. -- This prepares the targets for the case that WANT_QT5 and WANT_QT6 are both true. GnuPG-bug-id: 7205 --- lang/qt/src/Makefile.am | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lang/qt/src/Makefile.am b/lang/qt/src/Makefile.am index 87fb9f16..f812a9d9 100644 --- a/lang/qt/src/Makefile.am +++ b/lang/qt/src/Makefile.am @@ -397,35 +397,39 @@ $(camelcase_headers): Makefile.am echo ".h\"" >> "$@" if WANT_QT5 -install-cmake-files: QGpgmeConfig.cmake QGpgmeConfigVersion.cmake +install-cmake-files-qt5: QGpgmeConfig.cmake QGpgmeConfigVersion.cmake -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/QGpgme $(INSTALL) -m 644 QGpgmeConfig.cmake \ $(DESTDIR)$(libdir)/cmake/QGpgme/QGpgmeConfig.cmake $(INSTALL) -m 644 QGpgmeConfigVersion.cmake \ $(DESTDIR)$(libdir)/cmake/QGpgme/QGpgmeConfigVersion.cmake +install_cmake_files_qt5 = install-cmake-files-qt5 -uninstall-cmake-files: +uninstall-cmake-files-qt5: -rm $(DESTDIR)$(libdir)/cmake/QGpgme/QGpgmeConfigVersion.cmake -rm $(DESTDIR)$(libdir)/cmake/QGpgme/QGpgmeConfig.cmake -rmdir $(DESTDIR)$(libdir)/cmake/QGpgme/ +uninstall_cmake_files_qt5 = uninstall-cmake-files-qt5 endif if WANT_QT6 -install-cmake-files: QGpgmeQt6Config.cmake QGpgmeQt6ConfigVersion.cmake +install-cmake-files-qt6: QGpgmeQt6Config.cmake QGpgmeQt6ConfigVersion.cmake -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/QGpgmeQt6 $(INSTALL) -m 644 QGpgmeQt6Config.cmake \ $(DESTDIR)$(libdir)/cmake/QGpgmeQt6/QGpgmeQt6Config.cmake $(INSTALL) -m 644 QGpgmeQt6ConfigVersion.cmake \ $(DESTDIR)$(libdir)/cmake/QGpgmeQt6/QGpgmeQt6ConfigVersion.cmake +install_cmake_files_qt6 = install-cmake-files-qt6 -uninstall-cmake-files: +uninstall-cmake-files-qt6: -rm $(DESTDIR)$(libdir)/cmake/QGpgmeQt6/QGpgmeQt6ConfigVersion.cmake -rm $(DESTDIR)$(libdir)/cmake/QGpgmeQt6/QGpgmeQt6Config.cmake -rmdir $(DESTDIR)$(libdir)/cmake/QGpgmeQt6/ +uninstall_cmake_files_qt6 = uninstall-cmake-files-qt6 endif -install-data-local: install-cmake-files +install-data-local: $(install_cmake_files_qt5) $(install_cmake_files_qt6) -uninstall-local: uninstall-cmake-files +uninstall-local: $(uninstall_cmake_files_qt5) $(uninstall_cmake_files_qt6) BUILT_SOURCES = $(qgpgme_moc_sources) $(camelcase_headers)