summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2011-11-24 16:17:58 -0200
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2011-11-24 16:17:58 -0200
commit6d31094eed4ffd4cf7bab6a4ba693c1221d7fe84 (patch)
tree9f7ef282168328eb6f5a5c2841fcf8fcf1a8fe24
parentcbe9beffacabd2029a325813d085336b81693be2 (diff)
Also set a Qt max version as Requires.private in pkg-config files.
This is to avoid having TelepathyQt4.pc pick Qt5 instead of Qt4.
-rw-r--r--CMakeLists.txt2
-rw-r--r--TelepathyQt/TelepathyQt-uninstalled.pc.in2
-rw-r--r--TelepathyQt/TelepathyQt.pc.in2
-rw-r--r--TelepathyQt/TelepathyQtFarsight-uninstalled.pc.in2
-rw-r--r--TelepathyQt/TelepathyQtFarsight.pc.in2
-rw-r--r--cmake/modules/FindQt.cmake2
6 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9e990f2..6c51a12d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,7 +78,9 @@ include(MacroLogFeature)
# Required dependencies
# Find qt4 version >= 4.6 or qt5 >= 5.0.0
set(QT4_MIN_VERSION "4.6.0")
+set(QT4_MAX_VERSION "5.0.0")
set(QT5_MIN_VERSION "5.0.0")
+set(QT5_MAX_VERSION "6.0.0")
find_package(Qt REQUIRED)
# This value contains the library's SOVERSION. This value is to be increased everytime an API/ABI break
diff --git a/TelepathyQt/TelepathyQt-uninstalled.pc.in b/TelepathyQt/TelepathyQt-uninstalled.pc.in
index d0f44edf..206e6678 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}, QtDBus >= ${QT_MIN_VERSION}, QtNetwork >= ${QT_MIN_VERSION}, QtXml >= ${QT_MIN_VERSION}
+Requires.private: QtCore >= ${QT_MIN_VERSION}, QtCore < ${QT_MAX_VERSION}, QtDBus >= ${QT_MAX_VERSION}, QtDBus < ${QT_MIN_VERSION}, QtNetwork >= ${QT_MIN_VERSION}, QtNetwork < ${QT_MAX_VERSION}, QtXml >= ${QT_MIN_VERSION}, QtXml < ${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 a2f22757..bf61c525 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}, QtDBus >= ${QT_MIN_VERSION}, QtNetwork >= ${QT_MIN_VERSION}, QtXml >= ${QT_MIN_VERSION}
+Requires.private: QtCore >= ${QT_MIN_VERSION}, QtCore < ${QT_MAX_VERSION}, QtDBus >= ${QT_MAX_VERSION}, QtDBus < ${QT_MIN_VERSION}, QtNetwork >= ${QT_MIN_VERSION}, QtNetwork < ${QT_MAX_VERSION}, QtXml >= ${QT_MIN_VERSION}, QtXml < ${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-1.0
diff --git a/TelepathyQt/TelepathyQtFarsight-uninstalled.pc.in b/TelepathyQt/TelepathyQtFarsight-uninstalled.pc.in
index d63958c9..b922a9bb 100644
--- a/TelepathyQt/TelepathyQtFarsight-uninstalled.pc.in
+++ b/TelepathyQt/TelepathyQtFarsight-uninstalled.pc.in
@@ -6,6 +6,6 @@ abs_top_srcdir=${CMAKE_SOURCE_DIR}
Name: TelepathyQt${QT_VERSION_MAJOR}Farsight (uninstalled copy)
Description: Qt Telepathy Farsight utility library for the Telepathy framework
Version: ${PACKAGE_VERSION}
-Requires.private: QtCore >= ${QT_MIN_VERSION}, QtDBus >= ${QT_MIN_VERSION}, telepathy-glib >= 0.7.28, telepathy-farsight >= 0.0.4, TelepathyQt${QT_VERSION_MAJOR} = ${PACKAGE_VERSION}
+Requires.private: QtCore >= ${QT_MIN_VERSION}, QtCore < ${QT_MAX_VERSION}, QtDBus >= ${QT_MIN_VERSION}, QtDBus < ${QT_MAX_VERSION}, telepathy-glib >= 0.7.28, telepathy-farsight >= 0.0.4, TelepathyQt${QT_VERSION_MAJOR} = ${PACKAGE_VERSION}
Libs: ${CMAKE_BINARY_DIR}/TelepathyQt/Farsight/libtelepathy-qt${QT_VERSION_MAJOR}-farsight.so
Cflags: -I${CMAKE_SOURCE_DIR} -I${CMAKE_BINARY_DIR}
diff --git a/TelepathyQt/TelepathyQtFarsight.pc.in b/TelepathyQt/TelepathyQtFarsight.pc.in
index 3d23d6bf..4ef65c11 100644
--- a/TelepathyQt/TelepathyQtFarsight.pc.in
+++ b/TelepathyQt/TelepathyQtFarsight.pc.in
@@ -6,6 +6,6 @@ includedir=${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}
Name: TelepathyQt${QT_VERSION_MAJOR}Farsight
Description: Qt Telepathy Farsight utility library for the Telepathy framework
Version: ${PACKAGE_VERSION}
-Requires.private: QtCore >= ${QT_MIN_VERSION}, QtDBus >= ${QT_MIN_VERSION}, telepathy-glib >= 0.7.28, telepathy-farsight >= 0.0.4, TelepathyQt${QT_VERSION_MAJOR} = ${PACKAGE_VERSION}
+Requires.private: QtCore >= ${QT_MIN_VERSION}, QtCore < ${QT_MAX_VERSION}, QtDBus >= ${QT_MIN_VERSION}, QtDBus < ${QT_MAX_VERSION}, telepathy-glib >= 0.7.28, telepathy-farsight >= 0.0.4, TelepathyQt${QT_VERSION_MAJOR} = ${PACKAGE_VERSION}
Libs: -L${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR} -ltelepathy-qt${QT_VERSION_MAJOR}-farsight
Cflags: -I${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}/telepathy-1.0
diff --git a/cmake/modules/FindQt.cmake b/cmake/modules/FindQt.cmake
index 7a71d575..c2eac76a 100644
--- a/cmake/modules/FindQt.cmake
+++ b/cmake/modules/FindQt.cmake
@@ -37,12 +37,14 @@ IF(DESIRED_QT_VERSION MATCHES 4)
SET(Qt4_FIND_REQUIRED ${Qt_FIND_REQUIRED})
SET(Qt4_FIND_QUIETLY ${Qt_FIND_QUIETLY})
SET(QT_MIN_VERSION ${QT4_MIN_VERSION})
+ SET(QT_MAX_VERSION ${QT4_MAX_VERSION})
INCLUDE(FindQt4)
ENDIF(DESIRED_QT_VERSION MATCHES 4)
IF(DESIRED_QT_VERSION MATCHES 5)
SET(Qt5_FIND_REQUIRED ${Qt_FIND_REQUIRED})
SET(Qt5_FIND_QUIETLY ${Qt_FIND_QUIETLY})
SET(QT_MIN_VERSION ${QT5_MIN_VERSION})
+ SET(QT_MAX_VERSION ${QT5_MAX_VERSION})
INCLUDE(FindQt5)
ENDIF(DESIRED_QT_VERSION MATCHES 5)