From e9260d6db220f8ede97c038bd8475a0ed2cb8e4c Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Wed, 26 Feb 2014 18:40:43 +0000 Subject: [PATCH] Add 5 to pkg-config package names for Qt5 --- CMakeLists.txt | 5 +++++ TelepathyQt/TelepathyQt-uninstalled.pc.in | 2 +- TelepathyQt/TelepathyQt.pc.in | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e72f559..d5e1b71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,11 @@ set(QT5_MIN_VERSION "5.0.0") set(QT5_MAX_VERSION "6.0.0") find_package(Qt REQUIRED) +IF(QT_VERSION_MAJOR MATCHES 5) + # It is QtCore for Qt4 but Qt5Core for Qt5 in pkg-config + SET(QT_VERSION_PC 5) +ENDIF(QT_VERSION_MAJOR MATCHES 5) + foreach(flag ${QT_CONFIG_FLAGS}) if (${flag} MATCHES "reduce_relocations") set(TP_QT_EXECUTABLE_LINKER_FLAGS "-fPIE") diff --git a/TelepathyQt/TelepathyQt-uninstalled.pc.in b/TelepathyQt/TelepathyQt-uninstalled.pc.in index e8bf5ce..a61c2d3 100644 --- a/TelepathyQt/TelepathyQt-uninstalled.pc.in +++ b/TelepathyQt/TelepathyQt-uninstalled.pc.in @@ -6,6 +6,6 @@ abs_top_srcdir=${CMAKE_SOURCE_DIR} Name: TelepathyQt${QT_VERSION_MAJOR} (uninstalled copy) Description: Qt utility library for the Telepathy framework Version: ${PACKAGE_VERSION} -Requires.private: QtCore >= ${QT_MIN_VERSION}, QtCore < ${QT_MAX_VERSION}, QtDBus >= ${QT_MIN_VERSION}, QtDBus < ${QT_MAX_VERSION}, QtNetwork >= ${QT_MIN_VERSION}, QtNetwork < ${QT_MAX_VERSION}, QtXml >= ${QT_MIN_VERSION}, QtXml < ${QT_MAX_VERSION} +Requires.private: Qt${QT_VERSION_PC}Core >= ${QT_MIN_VERSION}, Qt${QT_VERSION_PC}Core < ${QT_MAX_VERSION}, Qt${QT_VERSION_PC}DBus >= ${QT_MIN_VERSION}, Qt${QT_VERSION_PC}DBus < ${QT_MAX_VERSION}, Qt${QT_VERSION_PC}Network >= ${QT_MIN_VERSION}, Qt${QT_VERSION_PC}Network < ${QT_MAX_VERSION}, Qt${QT_VERSION_PC}Xml >= ${QT_MIN_VERSION}, Qt${QT_VERSION_PC}Xml < ${QT_MAX_VERSION} Libs: ${CMAKE_BINARY_DIR}/TelepathyQt/libtelepathy-qt${QT_VERSION_MAJOR}.so Cflags: -I${CMAKE_SOURCE_DIR} -I${CMAKE_BINARY_DIR} diff --git a/TelepathyQt/TelepathyQt.pc.in b/TelepathyQt/TelepathyQt.pc.in index 92ba026..d245fed 100644 --- a/TelepathyQt/TelepathyQt.pc.in +++ b/TelepathyQt/TelepathyQt.pc.in @@ -6,6 +6,6 @@ includedir=${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR} Name: TelepathyQt${QT_VERSION_MAJOR} Description: Qt utility library for the Telepathy framework Version: ${PACKAGE_VERSION} -Requires.private: QtCore >= ${QT_MIN_VERSION}, QtCore < ${QT_MAX_VERSION}, QtDBus >= ${QT_MIN_VERSION}, QtDBus < ${QT_MAX_VERSION}, QtNetwork >= ${QT_MIN_VERSION}, QtNetwork < ${QT_MAX_VERSION}, QtXml >= ${QT_MIN_VERSION}, QtXml < ${QT_MAX_VERSION} +Requires.private: Qt${QT_VERSION_PC}Core >= ${QT_MIN_VERSION}, Qt${QT_VERSION_PC}Core < ${QT_MAX_VERSION}, Qt${QT_VERSION_PC}DBus >= ${QT_MIN_VERSION}, Qt${QT_VERSION_PC}DBus < ${QT_MAX_VERSION}, Qt${QT_VERSION_PC}Network >= ${QT_MIN_VERSION}, Qt${QT_VERSION_PC}Network < ${QT_MAX_VERSION}, Qt${QT_VERSION_PC}Xml >= ${QT_MIN_VERSION}, Qt${QT_VERSION_PC}Xml < ${QT_MAX_VERSION} Libs: -L${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR} -ltelepathy-qt${QT_VERSION_MAJOR} Cflags: -I${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}/telepathy-qt${QT_VERSION_MAJOR} -- 1.8.3.2