diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-05-23 20:54:28 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-06-05 11:58:43 +0300 |
commit | 23f1596e25cbea26e5bd0e7ead32b79bd91083e6 (patch) | |
tree | 37662b8905eb9f9dc062177c4bd53c54e480f349 | |
parent | a821ae1c6c005f0745b4b0cb9b6d8aeb270ada88 (diff) |
qt5: Fix QtGStreamerConfig*.cmake to use qt5 when appropriate
-rw-r--r-- | cmake/modules/QtGStreamerConfig.cmake.in | 13 | ||||
-rw-r--r-- | cmake/modules/QtGStreamerConfigCommon.cmake | 8 |
2 files changed, 17 insertions, 4 deletions
diff --git a/cmake/modules/QtGStreamerConfig.cmake.in b/cmake/modules/QtGStreamerConfig.cmake.in index 2f349fe..b139536 100644 --- a/cmake/modules/QtGStreamerConfig.cmake.in +++ b/cmake/modules/QtGStreamerConfig.cmake.in @@ -16,9 +16,16 @@ set(QTGSTREAMER_UTILS_LIBRARY @QTGSTREAMER_UTILS_LIBRARY@) set_and_check(QTGSTREAMER_INCLUDE_DIR @PACKAGE_INCLUDES_INSTALL_DIR@) # Find dependencies, if not already found -if (NOT DEFINED QT_INCLUDE_DIR) - message(STATUS "Qt hasn't been found yet. Looking...") - find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) +if ("@QTGSTREAMER_PACKAGE_NAME@" STREQUAL "Qt5GStreamer") + if (NOT DEFINED Qt5Widgets_INCLUDE_DIRS) + message(STATUS "Qt5 hasn't been found yet. Looking...") + find_package(Qt5Widgets) + endif() +else() + if (NOT DEFINED QT_INCLUDE_DIR) + message(STATUS "Qt4 hasn't been found yet. Looking...") + find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) + endif() endif() if (NOT DEFINED Boost_INCLUDE_DIRS) diff --git a/cmake/modules/QtGStreamerConfigCommon.cmake b/cmake/modules/QtGStreamerConfigCommon.cmake index e758e85..c2440c0 100644 --- a/cmake/modules/QtGStreamerConfigCommon.cmake +++ b/cmake/modules/QtGStreamerConfigCommon.cmake @@ -2,9 +2,15 @@ set(QTGLIB_LIBRARIES ${QTGLIB_LIBRARY}) set(QTGSTREAMER_LIBRARIES ${QTGSTREAMER_LIBRARY}) set(QTGSTREAMER_UI_LIBRARIES ${QTGSTREAMER_UI_LIBRARY}) set(QTGSTREAMER_UTILS_LIBRARIES ${QTGSTREAMER_UTILS_LIBRARY}) -set(QTGSTREAMER_INCLUDES ${QTGSTREAMER_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) +set(QTGSTREAMER_INCLUDES ${QTGSTREAMER_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) set(QTGSTREAMER_DEFINITIONS "-DQT_NO_KEYWORDS") +if (${QTGSTREAMER_LIBRARY} STREQUAL "Qt5GStreamer") + set(QTGSTREAMER_INCLUDES ${QTGSTREAMER_INCLUDES} ${Qt5Widgets_INCLUDE_DIRS}) +else() + set(QTGSTREAMER_INCLUDES ${QTGSTREAMER_INCLUDES} ${QT_INCLUDE_DIR}) +endif() + if (CMAKE_COMPILER_IS_GNUCXX) execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-dumpversion" RESULT_VARIABLE _GCC_DUMPVERSION_RESULT |