diff options
| author | Christophe Marin <christophe@krop.fr> | 2023-04-08 13:17:54 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2023-04-29 12:31:00 +0200 |
| commit | e759cf3ccb24148924047761c3149cfb845dc030 (patch) | |
| tree | dc4ea31f2491b287422f9f3d1e59d0b2124d91ad | |
| parent | b44a7ee310bd2c9bc7c0d234ab7a96c501d20559 (diff) | |
| download | qxmpp-e759cf3ccb24148924047761c3149cfb845dc030.tar.gz | |
Fix the generated qxmpp pkgconfig files
The include directory and link targets changed.
Also add a backward compatible pkgconfig file for Qt5 builds.
| -rw-r--r-- | CMakeLists.txt | 6 | ||||
| -rw-r--r-- | qxmpp.pc.in | 8 | ||||
| -rw-r--r-- | qxmpp_legacy.pc.in | 17 |
3 files changed, 24 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cdcc2428..fa41b2ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,16 +126,16 @@ install( ) # Generate QXmppQt5/6.pc -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qxmpp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/qxmpp.pc @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qxmpp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${QXMPP_TARGET}.pc @ONLY) install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/qxmpp.pc - RENAME QXmppQt${QT_VERSION_MAJOR}.pc + FILES ${CMAKE_CURRENT_BINARY_DIR}/${QXMPP_TARGET}.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" COMPONENT Devel ) # "qxmpp.pc" for backwards-compatibility if(QT_VERSION_MAJOR EQUAL 5) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qxmpp_legacy.pc.in ${CMAKE_CURRENT_BINARY_DIR}/qxmpp.pc @ONLY) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qxmpp.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" diff --git a/qxmpp.pc.in b/qxmpp.pc.in index 06af7ab5..a745e141 100644 --- a/qxmpp.pc.in +++ b/qxmpp.pc.in @@ -5,13 +5,13 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/qxmpp +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/@QXMPP_TARGET@ -Name: Qxmpp +Name: @QXMPP_TARGET@ Description: QXmpp Library Version: @PROJECT_VERSION@ -Libs: -lqxmpp -Libs.private: -lQt5Network -lQt5Xml -lQt5Core +Libs: -l@QXMPP_TARGET@ +Libs.private: -lQt@QT_VERSION_MAJOR@Network -lQt@QT_VERSION_MAJOR@Xml -lQt@QT_VERSION_MAJOR@Core Cflags: -I${includedir} diff --git a/qxmpp_legacy.pc.in b/qxmpp_legacy.pc.in new file mode 100644 index 00000000..b2f814ab --- /dev/null +++ b/qxmpp_legacy.pc.in @@ -0,0 +1,17 @@ +# SPDX-FileCopyrightText: 2017 Niels Ole Salscheider <niels_ole@salscheider-online.de> +# +# SPDX-License-Identifier: CC0-1.0 + +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/QXmppQt5 + + +Name: Qxmpp +Description: QXmpp Library +Version: @PROJECT_VERSION@ +Requires: QXmppQt5 +Libs: -lQXmppQt5 +Cflags: -I${includedir} + |
