diff options
-rw-r--r-- | CMakeLists.txt | 31 | ||||
-rw-r--r-- | cmake/modules/FindQt4or5.cmake | 216 | ||||
-rw-r--r-- | cmake/modules/QtGStreamerConfigCommon.cmake | 4 | ||||
-rw-r--r-- | cmake/modules/QtHelpers.cmake | 93 | ||||
-rw-r--r-- | codegen/CMakeLists.txt | 4 | ||||
-rw-r--r-- | elements/CMakeLists.txt | 2 | ||||
-rw-r--r-- | elements/gstqtvideosink/CMakeLists.txt | 25 | ||||
-rw-r--r-- | elements/gstqtvideosink/autotest.cpp | 2 | ||||
-rw-r--r-- | examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/appsink-src/CMakeLists.txt | 9 | ||||
-rw-r--r-- | examples/player/CMakeLists.txt | 9 | ||||
-rw-r--r-- | examples/qmlplayer/CMakeLists.txt | 28 | ||||
-rw-r--r-- | examples/recorder/CMakeLists.txt | 13 | ||||
-rw-r--r-- | examples/voip/CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/QGlib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/QGlib/QtGLib-2.0.pc.in | 2 | ||||
-rw-r--r-- | src/QGst/CMakeLists.txt | 21 | ||||
-rw-r--r-- | src/QGst/QtGStreamerUi-0.10.pc.in | 2 | ||||
-rw-r--r-- | src/qml/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tests/auto/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/compilation/CompilationTests_CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/manual/CMakeLists.txt | 14 |
23 files changed, 338 insertions, 175 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aa8abb0..3b701de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,23 +15,26 @@ option(QTGSTREAMER_EXAMPLES "Build QtGStreamer's examples" ON) option(QTGSTREAMER_CODEGEN "Build and use QtGStreamer's codegen" OFF) option(USE_GST_PLUGIN_DIR "Install gstreamer plugins at the system location" ON) option(USE_QT_PLUGIN_DIR "Install qt plugins at the system location" ON) -set(QT_VERSION "4" CACHE STRING "Qt version used for the build") include(GNUInstallDirs) include(MacroLogFeature) -include(QtHelpers) -macro_log_feature(QT_FOUND "Qt" "Required for building everything" "http://qt.nokia.com/" TRUE "${QT_MIN_VERSION}") -macro_log_feature(QT_QTOPENGL_FOUND "QtOpenGL" - "Required for OpenGL acceleration in qtvideosink and QtGStreamerUi" - "http://qt.nokia.com/" FALSE "${QT_MIN_VERSION}") -macro_log_feature(QT_QTDECLARATIVE_FOUND "QtDeclarative" "Required for building QML support" - "http://qt.nokia.com/" FALSE "${QT_MIN_VERSION}") +set(Qt4_MIN_VERSION 4.7) +set(Qt5_MIN_VERSION 5.0.0) +find_package(Qt4or5 COMPONENTS Core Gui Widgets OPTIONAL_COMPONENTS OpenGL Quick1 Test) +macro_log_feature(Qt4or5_FOUND "Qt" "Required for building everything" + "http://qt-project.org/" TRUE "${Qt4or5_MIN_VERSION}") +macro_log_feature(Qt4or5_OpenGL_FOUND "QtOpenGL" + "Required for OpenGL acceleration in qtvideosink and QtGStreamerUi" + "http://qt-project.org/" FALSE "${Qt4or5_MIN_VERSION}") +macro_log_feature(Qt4or5_Quick1_FOUND "QtQuick1 (QtDeclarative)" + "Required for building QtQuick1 support" + "http://qt-project.org/" FALSE "${Qt4or5_MIN_VERSION}") if (QTGSTREAMER_TESTS) - macro_log_feature(QT_QTTEST_FOUND "QtTest" "Required for building unit tests" - "http://qt.nokia.com/" FALSE "${QT_MIN_VERSION}") - if (NOT QT_QTTEST_FOUND) + macro_log_feature(Qt4or5_Test_FOUND "QtTest" "Required for building unit tests" + "http://qt-project.org/" FALSE "${Qt4or5_MIN_VERSION}") + if (NOT Qt4or5_Test_FOUND) set(QTGSTREAMER_TESTS OFF) endif() endif() @@ -41,13 +44,15 @@ macro_log_feature(Boost_FOUND "Boost" "Required for building QtGLib" "http://www # set the QTGSTREAMER_* cmake variables set(BUILDING_QTGSTREAMER TRUE) -if (USE_QT5) +if (${QT_VERSION} STREQUAL "5") + set(USE_QT5 TRUE) set(QTGLIB_LIBRARY Qt5GLib) set(QTGSTREAMER_LIBRARY Qt5GStreamer) set(QTGSTREAMER_UI_LIBRARY Qt5GStreamerUi) set(QTGSTREAMER_UTILS_LIBRARY Qt5GStreamerUtils) set(QTGSTREAMER_PACKAGE_NAME Qt5GStreamer) -elseif (USE_QT4) +elseif (${QT_VERSION} STREQUAL "4") + set(USE_QT4 TRUE) set(QTGLIB_LIBRARY QtGLib) set(QTGSTREAMER_LIBRARY QtGStreamer) set(QTGSTREAMER_UI_LIBRARY QtGStreamerUi) diff --git a/cmake/modules/FindQt4or5.cmake b/cmake/modules/FindQt4or5.cmake new file mode 100644 index 0000000..a5f5745 --- /dev/null +++ b/cmake/modules/FindQt4or5.cmake @@ -0,0 +1,216 @@ +# - Try to find an installed version of Qt based on QT_VERSION +# Once done this will define +# +# Qt4or5_FOUND - The specified Qt version was found +# Qt4or5_<Component>_FOUND - For each <Component> specified, if found +# QT_QMAKE_EXECUTABLE - Path to qmake +# QT_IMPORTS_DIR - Path to qtquick1 imports dir +# +# Use qt4or5_use_modules(target [ LINK_PUBLIC | LINK_PRIVATE ] <modules>) +# to make use of Qt4 or Qt5 on a target +# +# Copyright (c) 2013, Fluendo S.L. <support@fluendo.com> +# Copyright (c) 2013, Collabora Ltd. <info@collabora.com> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +set(QT_VERSION "4" CACHE STRING "Qt version used for the build") + +macro(_qt4or5_component_name_to_qt_component qt_component component) + if (${component} STREQUAL "Widgets" AND ${QT_VERSION} STREQUAL "4") + set(${qt_component} "Gui") + elseif (${component} STREQUAL "Quick1") + set(${qt_component} "Declarative") + elseif (${component} STREQUAL "Quick2" AND ${QT_VERSION} STREQUAL "5") + set(${qt_component} "Quick") + else() + set(${qt_component} ${component}) + endif() +endmacro() + +macro(_qt4or5_component_name_from_qt_component component qt_component) + if (${qt_component} STREQUAL "Declarative") + set(${component} "Quick1") + elseif (${qt_component} STREQUAL "Quick") + set(${component} "Quick2") + else() + set(${component} ${qt_component}) + endif() +endmacro() + +macro(_qt4or5_component_names_to_qt_components output_list) + foreach(module ${ARGN}) + _qt4or5_component_name_to_qt_component(qt_component ${module}) + list(APPEND ${output_list} ${qt_component}) + unset(qt_component) + endforeach() + + list(REMOVE_DUPLICATES ${output_list}) +endmacro() + +if (Qt4or5_FIND_QUIETLY) + set(_Qt4or5_FIND_PACKAGE_ARGS QUIET) +endif() + +_qt4or5_component_names_to_qt_components(_Qt4or5_FIND_COMPONENTS ${Qt4or5_FIND_COMPONENTS}) +_qt4or5_component_names_to_qt_components(_Qt4or5_FIND_COMPONENTS ${Qt4or5_FIND_OPTIONAL_COMPONENTS}) + +if (${QT_VERSION} STREQUAL "5") + + set(Qt4or5_MIN_VERSION "${Qt5_MIN_VERSION}") + + if (NOT Qt4or5_FIND_QUIETLY) + message(STATUS "Using Qt5 (min: ${Qt4or5_MIN_VERSION})") + endif() + + # Find Qt5 modules + foreach (qt_component ${_Qt4or5_FIND_COMPONENTS}) + find_package(Qt5${qt_component} ${Qt5_MIN_VERSION} ${_Qt4or5_FIND_PACKAGE_ARGS}) + if (Qt5${qt_component}_FOUND) + _qt4or5_component_name_from_qt_component(component ${qt_component}) + set (Qt4or5_${component}_FOUND TRUE) + unset(component) + endif() + endforeach() + + set(_Qt4or5_FOUND ${Qt5Core_FOUND}) + + # Set QT_QMAKE_EXECUTABLE and QT_IMPORTS_DIR + if (Qt5Core_FOUND) + get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION) + + function(_QT5_QUERY_QMAKE VAR RESULT) + execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR} + RESULT_VARIABLE return_code + OUTPUT_VARIABLE output + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) + if(NOT return_code) + file(TO_CMAKE_PATH "${output}" output) + set(${RESULT} ${output} PARENT_SCOPE) + endif() + endfunction() + + _qt5_query_qmake(QT_INSTALL_IMPORTS QT_IMPORTS_DIR) + endif() + + # Set pkg-config package names + foreach(component Core Gui Widgets Quick1 Quick2 Test OpenGL) + _qt4or5_component_name_to_qt_component(qt_component ${component}) + set(Qt4or5_${component}_PKGCONFIG_DEP "Qt5${qt_component}") + unset(qt_component) + endforeach() + +elseif (${QT_VERSION} STREQUAL "4") + + set(Qt4or5_MIN_VERSION "${Qt4_MIN_VERSION}") + + if (NOT Qt4or5_FIND_QUIETLY) + message(STATUS "Using Qt4 (min: ${Qt4or5_MIN_VERSION})") + endif() + + # Find Qt4 + set(QT_USE_IMPORTED_TARGETS TRUE) + find_package(Qt4 ${Qt4_MIN_VERSION} ${_Qt4or5_FIND_PACKAGE_ARGS}) + + set(_Qt4or5_FOUND ${Qt4_FOUND}) + + # set Qt4or5_Foo_FOUND + foreach (qt_component ${_Qt4or5_FIND_COMPONENTS}) + string(TOUPPER ${qt_component} u_qt_component) + if (QT_QT${u_qt_component}_FOUND) + _qt4or5_component_name_from_qt_component(component ${qt_component}) + set (Qt4or5_${component}_FOUND TRUE) + # special case for QtWidgets, which is part of QtGui in Qt4 + if (${component} STREQUAL "Gui") + set(Qt4or5_Widgets_FOUND TRUE) + endif() + unset(component) + endif() + unset(u_qt_component) + endforeach() + + # define or include qt4_use_modules() + if (CMAKE_VERSION VERSION_LESS 2.8.10) + # copy-paste from Qt4Macros, just to support cmake 2.8.9 + function(qt4_use_modules _target _link_type) + if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE") + set(modules ${ARGN}) + set(link_type ${_link_type}) + else() + set(modules ${_link_type} ${ARGN}) + endif() + foreach(_module ${modules}) + string(TOUPPER ${_module} _ucmodule) + if (NOT QT_QT${_ucmodule}_FOUND) + message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.") + endif() + if ("${_ucmodule}" STREQUAL "MAIN") + message(FATAL_ERROR "Can not use \"${_module}\" module with qt4_use_modules.") + endif() + target_link_libraries(${_target} ${link_type} ${QT_QT${_ucmodule}_LIBRARY}) + set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES + ${QT_QT${_ucmodule}_INCLUDE_DIR} ${QT_HEADERS_DIR} ${QT_MKSPECS_DIR}/default) + set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS + ${QT_QT${_ucmodule}_COMPILE_DEFINITIONS}) + endforeach() + endfunction() + else() + include(Qt4Macros) + endif() + + # Set pkg-config package names + foreach(component Core Gui Widgets Quick1 Quick2 Test OpenGL) + _qt4or5_component_name_to_qt_component(qt_component ${component}) + set(Qt4or5_${component}_PKGCONFIG_DEP "Qt${qt_component}") + unset(qt_component) + endforeach() + +else() + + message(WARNING "Unsupported QT_VERSION specified: ${QT_VERSION}") + set (_Qt4or5_FOUND FALSE) + +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Qt4or5 FOUND_VAR Qt4or5_FOUND REQUIRED_VARS _Qt4or5_FOUND HANDLE_COMPONENTS) + +# qt4or5_use_modules(target [ LINK_PUBLIC | LINK_PRIVATE ] <modules>) +# Supported modules: Core, Gui, Widgets, Quick1, Quick2, Test, OpenGL +function(qt4or5_use_modules _target _link_type) + if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE") + set(modules ${ARGN}) + set(link_type ${_link_type}) + else() + set(modules ${_link_type} ${ARGN}) + endif() + + _qt4or5_component_names_to_qt_components(real_modules ${modules}) + + # Verify that Qt5 was found before using qt5_* macros, + # otherwise cmake will bail out if they are undefined. + if (${QT_VERSION} STREQUAL "5" AND Qt5Core_FOUND) + qt5_use_modules(${_target} ${link_type} ${real_modules}) + elseif (${QT_VERSION} STREQUAL "4") + qt4_use_modules(${_target} ${link_type} ${real_modules}) + endif() +endfunction() + +# qt4or5_wrap_ui(outfiles inputfile ... ) +macro(qt4or5_wrap_ui) + if (${QT_VERSION} STREQUAL "5" AND Qt5Core_FOUND) + qt5_wrap_ui(${ARGV}) + elseif (${QT_VERSION} STREQUAL "4") + qt4_wrap_ui(${ARGV}) + endif() +endmacro() + +# qt4or5_add_resources(outfiles inputfile ... ) +macro(qt4or5_add_resources) + if (${QT_VERSION} STREQUAL "5" AND Qt5Core_FOUND) + qt5_add_resources(${ARGV}) + elseif (${QT_VERSION} STREQUAL "4") + qt4_add_resources(${ARGV}) + endif() +endmacro() diff --git a/cmake/modules/QtGStreamerConfigCommon.cmake b/cmake/modules/QtGStreamerConfigCommon.cmake index c2440c0..554dce3 100644 --- a/cmake/modules/QtGStreamerConfigCommon.cmake +++ b/cmake/modules/QtGStreamerConfigCommon.cmake @@ -5,8 +5,8 @@ set(QTGSTREAMER_UTILS_LIBRARIES ${QTGSTREAMER_UTILS_LIBRARY}) 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}) +if (${QTGSTREAMER_LIBRARY} MATCHES ".*Qt5GStreamer.*") + set(QTGSTREAMER_INCLUDES ${QTGSTREAMER_INCLUDES} ${Qt5Core_INCLUDE_DIRS}) else() set(QTGSTREAMER_INCLUDES ${QTGSTREAMER_INCLUDES} ${QT_INCLUDE_DIR}) endif() diff --git a/cmake/modules/QtHelpers.cmake b/cmake/modules/QtHelpers.cmake deleted file mode 100644 index f186792..0000000 --- a/cmake/modules/QtHelpers.cmake +++ /dev/null @@ -1,93 +0,0 @@ -# - Try to find an installed version of Qt based on QT_VERSION -# Once done this will define -# -# USE_QT4 - Building with Qt4 -# USE_QT5 - Building with Qt5 -# QT_MIN_VERSION - qt minimum -# -# Copyright (c) 2013, Fluendo S.L. <support@fluendo.com> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (${QT_VERSION} STREQUAL "5") - set(USE_QT5 TRUE) - set(QT_MIN_VERSION 5.0.1) - message(STATUS "Using Qt5 (min: ${QT_MIN_VERSION})") -elseif (${QT_VERSION} STREQUAL "4") - set(USE_QT4 TRUE) - set(QT_MIN_VERSION 4.7) - message(STATUS "Using Qt4 (min:${QT_MIN_VERSION})") -endif() - -if (USE_QT5) - find_package(Qt5Core) - find_package(Qt5Gui) - find_package(Qt5Widgets) - if (Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Widgets_FOUND) - set(QT_FOUND true) - set(QT_QTCORE_FOUND true) - set(QT_QTGUI_FOUND true) - set(QT_QTCORE_LIBRARY ${Qt5Core_LIBRARIES}) - set(QT_QTGUI_LIBRARY ${Qt5Widgets_LIBRARIES}) - set(QT_INCLUDE_DIR ${Qt5Widgets_INCLUDE_DIRS}) - - function(_QT5_QUERY_QMAKE VAR RESULT) - get_target_property(_QMAKE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION) - execute_process(COMMAND "${_QMAKE}" -query ${VAR} - RESULT_VARIABLE return_code - OUTPUT_VARIABLE output - OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) - if(NOT return_code) - file(TO_CMAKE_PATH "${output}" output) - set(${RESULT} ${output} PARENT_SCOPE) - endif() - endfunction() - - _qt5_query_qmake(QT_INSTALL_IMPORTS QT_IMPORTS_DIR) - endif() - find_package(Qt5Declarative) - if (Qt5Declarative_FOUND) - set(QT_QTDECLARATIVE_FOUND true) - set(QT_QTDECLARATIVE_LIBRARY ${Qt5Declarative_LIBRARIES}) - set(QT_QTDECLARATIVE_INCLUDE_DIR ${Qt5Declarative_INCLUDE_DIRS}) - endif() - find_package(Qt5Test) - if (Qt5Test_FOUND) - set(QT_QTTEST_FOUND true) - set(QT_QTTEST_LIBRARY ${Qt5Test_LIBRARIES}) - set(QT_QTTEST_INCLUDE_DIR ${Qt5Test_INCLUDE_DIRS}) - endif () - find_package(Qt5OpenGL) - if (Qt5OpenGL_FOUND) - set(QT_QTOPENGL_FOUND true) - set(QT_QTOPENGL_LIBRARY ${Qt5OpenGL_LIBRARIES}) - set(QT_QTOPENGL_INCLUDE_DIR ${Qt5OpenGL_INCLUDE_DIRS}) - endif() - set(PKG_CONFIG_QTCORE_DEP Qt5Core) - set(PKG_CONFIG_QTGUI_DEP Qt5Widgets) -elseif (USE_QT4) - find_package(Qt4 COMPONENTS QtCore QtGui) - set(PKG_CONFIG_QTCORE_DEP QtCore) - set(PKG_CONFIG_QTGUI_DEP QtGui) -else() - message(FATAL_ERROR "Qt supported versions are: 4 and 5") -endif() - -# qt_helper_wrap_ui(outfiles inputfile ... ) -macro(QT_HELPER_WRAP_UI) - if (USE_QT5) - qt5_wrap_ui(${ARGV}) - elseif (USE_QT4) - qt4_wrap_ui(${ARGV}) - endif() -endmacro() - -# qt_helper_add_resources(outfiles inputfile ... ) -macro(QT_HELPER_ADD_RESOURCES) - if (USE_QT5) - qt5_add_resources(${ARGV}) - elseif (USE_QT4) - qt4_add_resources(${ARGV}) - endif() -endmacro() diff --git a/codegen/CMakeLists.txt b/codegen/CMakeLists.txt index af70bbb..f0318dc 100644 --- a/codegen/CMakeLists.txt +++ b/codegen/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${QT_INCLUDE_DIR}) - flex_target(analyzer analyzer.l ${CMAKE_CURRENT_BINARY_DIR}/analyzer.cpp) bison_target(parser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp COMPILE_FLAGS "--defines") add_flex_bison_dependency(analyzer parser) @@ -12,4 +10,4 @@ if (MSVC) endif() add_executable(codegen ${FLEX_analyzer_OUTPUTS} ${BISON_parser_OUTPUTS} generator.cpp) -target_link_libraries(codegen ${QT_QTCORE_LIBRARY}) +qt4or5_use_modules(codegen Core) diff --git a/elements/CMakeLists.txt b/elements/CMakeLists.txt index f563d74..bfa7f65 100644 --- a/elements/CMakeLists.txt +++ b/elements/CMakeLists.txt @@ -8,7 +8,7 @@ add_definitions(-DPACKAGE="qt-gstreamer" -DGST_DISABLE_XML -DGST_DISABLE_LOADSAVE) -include_directories(${QT_INCLUDE_DIR} ${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR}) +include_directories(${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR}) if (GSTREAMER_BASE_LIBRARY_FOUND AND GSTREAMER_VIDEO_LIBRARY_FOUND) include_directories(${GSTREAMER_BASE_INCLUDE_DIR} ${GSTREAMER_VIDEO_INCLUDE_DIR}) diff --git a/elements/gstqtvideosink/CMakeLists.txt b/elements/gstqtvideosink/CMakeLists.txt index 49de034..1051fea 100644 --- a/elements/gstqtvideosink/CMakeLists.txt +++ b/elements/gstqtvideosink/CMakeLists.txt @@ -19,7 +19,7 @@ set(GstQtVideoSink_SRCS ${CMAKE_CURRENT_BINARY_DIR}/gstqtvideosinkmarshal.c ) -if (QT_QTOPENGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) +if (Qt4or5_OpenGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) set(GstQtVideoSink_GL_SRCS openglsurfacepainter.cpp gstqtglvideosinkbase.cpp @@ -30,11 +30,11 @@ if (QT_QTOPENGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) ) if (OPENGLES2_FOUND) - set(GstQtVideoSink_GL_LIBS ${OPENGLES2_LIBRARY} ${QT_QTOPENGL_LIBRARY}) - include_directories(${OPENGLES2_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR}) + set(GstQtVideoSink_GL_LIBS ${OPENGLES2_LIBRARY}) + include_directories(${OPENGLES2_INCLUDE_DIR}) else() - set(GstQtVideoSink_GL_LIBS ${OPENGL_gl_LIBRARY} ${QT_QTOPENGL_LIBRARY}) - include_directories(${OPENGL_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR}) + set(GstQtVideoSink_GL_LIBS ${OPENGL_gl_LIBRARY}) + include_directories(${OPENGL_INCLUDE_DIR}) endif() else() add_definitions(-DGST_QT_VIDEO_SINK_NO_OPENGL) @@ -42,8 +42,6 @@ endif() add_library(gstqtvideosink MODULE ${GstQtVideoSink_SRCS} ${GstQtVideoSink_GL_SRCS}) target_link_libraries(gstqtvideosink - ${QT_QTCORE_LIBRARY} - ${QT_QTGUI_LIBRARY} ${GOBJECT_LIBRARIES} ${GSTREAMER_LIBRARY} ${GSTREAMER_BASE_LIBRARY} @@ -51,9 +49,12 @@ target_link_libraries(gstqtvideosink ${GSTREAMER_INTERFACES_LIBRARY} ${GstQtVideoSink_GL_LIBS} ) +qt4or5_use_modules(gstqtvideosink Core Gui Widgets) +if (Qt4or5_OpenGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) + qt4or5_use_modules(gstqtvideosink OpenGL) +endif() install(TARGETS gstqtvideosink DESTINATION ${QTGSTREAMER_GST_PLUGINS_INSTALL_DIR}) - if (QTGSTREAMER_TESTS) add_executable(qtvideosink_autotest autotest.cpp @@ -63,9 +64,6 @@ if (QTGSTREAMER_TESTS) ${GstQtVideoSink_test_GL_SRCS} ) target_link_libraries(qtvideosink_autotest - ${QT_QTTEST_LIBRARY} - ${QT_QTCORE_LIBRARY} - ${QT_QTGUI_LIBRARY} ${GOBJECT_LIBRARIES} ${GSTREAMER_LIBRARY} ${GSTREAMER_BASE_LIBRARY} @@ -73,5 +71,8 @@ if (QTGSTREAMER_TESTS) ${GSTREAMER_INTERFACES_LIBRARY} ${GstQtVideoSink_GL_LIBS} ) - #add_test(NAME qtvideosink_autotest COMMAND qtvideosink_autotest) + qt4or5_use_modules(qtvideosink_autotest Core Gui Widgets Test) + if (Qt4or5_OpenGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) + qt4or5_use_modules(qtvideosink_autotest OpenGL) + endif() endif() diff --git a/elements/gstqtvideosink/autotest.cpp b/elements/gstqtvideosink/autotest.cpp index 2bd2fbf..7c3f75b 100644 --- a/elements/gstqtvideosink/autotest.cpp +++ b/elements/gstqtvideosink/autotest.cpp @@ -15,8 +15,6 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define QT_GUI_LIB 1 //enable QtGui in QtTest - #include <gst/gst.h> #include <gst/video/video.h> #include <gst/interfaces/colorbalance.h> diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c067aec..2176826 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -29,7 +29,7 @@ example_distcheck(recorder) add_subdirectory(voip) example_distcheck(voip) -if (QT_QTDECLARATIVE_FOUND) +if (Qt4or5_Quick1_FOUND) add_subdirectory(qmlplayer) endif() example_distcheck(qmlplayer) diff --git a/examples/appsink-src/CMakeLists.txt b/examples/appsink-src/CMakeLists.txt index c509693..18103d3 100644 --- a/examples/appsink-src/CMakeLists.txt +++ b/examples/appsink-src/CMakeLists.txt @@ -4,7 +4,13 @@ project(qtgst-example-appsink-src) if (NOT BUILDING_QTGSTREAMER) - find_package(QtGStreamer REQUIRED) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules) + find_package(Qt4or5 COMPONENTS Core REQUIRED) + if (${QT_VERSION} STREQUAL "5") + find_package(Qt5GStreamer REQUIRED) + else() + find_package(QtGStreamer REQUIRED) + endif() endif() include_directories(${QTGSTREAMER_INCLUDES}) @@ -13,3 +19,4 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}") add_executable(appsink-src main.cpp) target_link_libraries(appsink-src ${QTGSTREAMER_UTILS_LIBRARIES}) +qt4or5_use_modules(appsink-src Core) diff --git a/examples/player/CMakeLists.txt b/examples/player/CMakeLists.txt index b0d49ba..c6f4872 100644 --- a/examples/player/CMakeLists.txt +++ b/examples/player/CMakeLists.txt @@ -1,7 +1,13 @@ project(qtgst-example-player) if (NOT BUILDING_QTGSTREAMER) - find_package(QtGStreamer REQUIRED) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules) + find_package(Qt4or5 COMPONENTS Core Gui Widgets REQUIRED) + if (${QT_VERSION} STREQUAL "5") + find_package(Qt5GStreamer REQUIRED) + else() + find_package(QtGStreamer REQUIRED) + endif() set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) endif() @@ -14,3 +20,4 @@ set(player_SOURCES main.cpp player.cpp mediaapp.cpp) add_executable(player ${player_SOURCES}) target_link_libraries(player ${QTGSTREAMER_UI_LIBRARIES}) +qt4or5_use_modules(player Core Gui Widgets) diff --git a/examples/qmlplayer/CMakeLists.txt b/examples/qmlplayer/CMakeLists.txt index 1add76b..7b765b1 100644 --- a/examples/qmlplayer/CMakeLists.txt +++ b/examples/qmlplayer/CMakeLists.txt @@ -1,12 +1,15 @@ project(qtgst-example-qmlplayer) if (NOT BUILDING_QTGSTREAMER) - find_package(Qt4 COMPONENTS QtCore QtGui QtDeclarative REQUIRED) - find_package(QtGStreamer REQUIRED) - find_package(OpenGL) - - # Use a relative module path to avoid copying FindOpenGLES2.cmake here set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules) + find_package(Qt4or5 COMPONENTS Core Gui Widgets Quick1 REQUIRED) + if (${QT_VERSION} STREQUAL "5") + find_package(Qt5GStreamer REQUIRED) + else() + find_package(QtGStreamer REQUIRED) + endif() + + find_package(OpenGL) find_package(OpenGLES2) set(CMAKE_AUTOMOC ON) @@ -23,8 +26,7 @@ include_directories(${QTGSTREAMER_INCLUDES}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}") add_definitions(${QTGSTREAMER_DEFINITIONS}) -if (QT_QTOPENGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) - set(qmlplayer_gl_libs ${QT_QTOPENGL_LIBRARY}) +if (Qt4or5_OpenGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) if (OPENGLES2_FOUND) include_directories(${OPENGLES2_INCLUDE_DIR}) else() @@ -35,14 +37,14 @@ else() endif() set(qmlplayer_SOURCES main.cpp player.cpp) -qt_helper_add_resources(qmlplayer_rcc_SOURCES qmlplayer.qrc) +qt4or5_add_resources(qmlplayer_rcc_SOURCES qmlplayer.qrc) add_executable(qmlplayer ${qmlplayer_SOURCES} ${qmlplayer_rcc_SOURCES} ) -target_link_libraries(qmlplayer - ${QTGSTREAMER_UI_LIBRARIES} - ${QT_QTDECLARATIVE_LIBRARY} - ${qmlplayer_gl_libs} -) +target_link_libraries(qmlplayer ${QTGSTREAMER_UI_LIBRARIES}) +qt4or5_use_modules(qmlplayer Core Gui Widgets Quick1) +if (Qt4or5_OpenGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) + qt4or5_use_modules(qmlplayer OpenGL) +endif() diff --git a/examples/recorder/CMakeLists.txt b/examples/recorder/CMakeLists.txt index 25a2ac4..5185adf 100644 --- a/examples/recorder/CMakeLists.txt +++ b/examples/recorder/CMakeLists.txt @@ -1,7 +1,13 @@ project(qtgst-example-recorder) if (NOT BUILDING_QTGSTREAMER) - find_package(QtGStreamer REQUIRED) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules) + find_package(Qt4or5 COMPONENTS Core Gui Widgets REQUIRED) + if (${QT_VERSION} STREQUAL "5") + find_package(Qt5GStreamer REQUIRED) + else() + find_package(QtGStreamer REQUIRED) + endif() set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) endif() @@ -10,6 +16,7 @@ include_directories(${QTGSTREAMER_INCLUDES}) add_definitions(${QTGSTREAMER_DEFINITIONS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}") -qt_helper_wrap_ui(recorder_UI_SRCS recorder.ui) +qt4or5_wrap_ui(recorder_UI_SRCS recorder.ui) add_executable(recorder main.cpp ${recorder_UI_SRCS}) -target_link_libraries(recorder ${QTGSTREAMER_LIBRARIES} ${QT_QTGUI_LIBRARY}) +target_link_libraries(recorder ${QTGSTREAMER_LIBRARIES}) +qt4or5_use_modules(recorder Core Gui Widgets) diff --git a/examples/voip/CMakeLists.txt b/examples/voip/CMakeLists.txt index 5735dbd..96f608f 100644 --- a/examples/voip/CMakeLists.txt +++ b/examples/voip/CMakeLists.txt @@ -1,7 +1,13 @@ project(qtgst-example-voip) if (NOT BUILDING_QTGSTREAMER) - find_package(QtGStreamer REQUIRED) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules) + find_package(Qt4or5 COMPONENTS Core Gui Widgets REQUIRED) + if (${QT_VERSION} STREQUAL "5") + find_package(Qt5GStreamer REQUIRED) + else() + find_package(QtGStreamer REQUIRED) + endif() set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) endif() @@ -10,6 +16,7 @@ include_directories(${QTGSTREAMER_INCLUDES}) add_definitions(${QTGSTREAMER_DEFINITIONS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}") -qt_helper_wrap_ui(voip_UI_SRCS voip.ui) +qt4or5_wrap_ui(voip_UI_SRCS voip.ui) add_executable(voip main.cpp ${voip_UI_SRCS}) target_link_libraries(voip ${QTGSTREAMER_UI_LIBRARIES}) +qt4or5_use_modules(voip Core Gui Widgets) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d680cf1..885e526 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -50,8 +50,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}") add_subdirectory(QGlib) add_subdirectory(QGst) -# Build the qml plugin -if (QT_QTDECLARATIVE_FOUND) +# Build the QtQuick1 plugin +if (Qt4or5_Quick1_FOUND) add_subdirectory(qml) endif() diff --git a/src/QGlib/CMakeLists.txt b/src/QGlib/CMakeLists.txt index 5ee1809..e2df4d1 100644 --- a/src/QGlib/CMakeLists.txt +++ b/src/QGlib/CMakeLists.txt @@ -49,8 +49,8 @@ add_library(${QTGLIB_LIBRARY} ${SHARED_OR_STATIC} ${QtGLib_SRCS}) set_target_properties(${QTGLIB_LIBRARY} PROPERTIES OUTPUT_NAME ${QTGLIB_LIBRARY}-${QTGLIB_API_VERSION} SOVERSION ${QTGLIB_SOVERSION} VERSION ${QTGSTREAMER_VERSION}) -target_link_libraries(${QTGLIB_LIBRARY} ${QT_QTCORE_LIBRARY} ${GOBJECT_LIBRARIES}) -target_link_libraries(${QTGLIB_LIBRARY} LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY}) +target_link_libraries(${QTGLIB_LIBRARY} LINK_PRIVATE ${GOBJECT_LIBRARIES}) +qt4or5_use_modules(${QTGLIB_LIBRARY} LINK_PUBLIC Core) # Install install(TARGETS ${QTGLIB_LIBRARY} EXPORT ${EXPORT_TARGET_SET} ${QTGSTREAMER_INSTALL_TARGET_DEFAULT_ARGS}) diff --git a/src/QGlib/QtGLib-2.0.pc.in b/src/QGlib/QtGLib-2.0.pc.in index 55583c5..96dac7c 100644 --- a/src/QGlib/QtGLib-2.0.pc.in +++ b/src/QGlib/QtGLib-2.0.pc.in @@ -5,7 +5,7 @@ includedir=${prefix}/@QTGSTREAMER_INCLUDES_INSTALL_DIR@ Name: @QTGLIB_LIBRARY@-2.0 Description: Qt-style C++ bindings library for GLib & GObject -Requires: @PKG_CONFIG_QTCORE_DEP@ +Requires: @Qt4or5_Core_PKGCONFIG_DEP@ Requires.private: gobject-2.0 Version: @QTGSTREAMER_VERSION@ Cflags: -I${includedir} diff --git a/src/QGst/CMakeLists.txt b/src/QGst/CMakeLists.txt index f8ac39c..186b256 100644 --- a/src/QGst/CMakeLists.txt +++ b/src/QGst/CMakeLists.txt @@ -128,8 +128,7 @@ include_directories( ) add_definitions(-DGST_DISABLE_XML -DGST_DISABLE_LOADSAVE) -if (QT_QTOPENGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) - set(QtGStreamerUi_GL_LIBS ${QT_QTOPENGL_LIBRARY}) +if (Qt4or5_OpenGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) if (OPENGLES2_FOUND) include_directories(${OPENGLES2_INCLUDE_DIR}) else() @@ -147,26 +146,32 @@ add_library(${QTGSTREAMER_LIBRARY} ${SHARED_OR_STATIC} ${QtGStreamer_SRCS}) set_target_properties(${QTGSTREAMER_LIBRARY} PROPERTIES OUTPUT_NAME ${QTGSTREAMER_LIBRARY}-${QTGSTREAMER_API_VERSION} SOVERSION ${QTGSTREAMER_SOVERSION} VERSION ${QTGSTREAMER_VERSION}) -target_link_libraries(${QTGSTREAMER_LIBRARY} ${QTGLIB_LIBRARY} ${GOBJECT_LIBRARIES} +target_link_libraries(${QTGSTREAMER_LIBRARY} LINK_PUBLIC ${QTGLIB_LIBRARY}) +target_link_libraries(${QTGSTREAMER_LIBRARY} LINK_PRIVATE ${GOBJECT_LIBRARIES} ${GSTREAMER_LIBRARY} ${GSTREAMER_INTERFACES_LIBRARY} ${GSTREAMER_PBUTILS_LIBRARY}) -target_link_libraries(${QTGSTREAMER_LIBRARY} LINK_INTERFACE_LIBRARIES ${QTGLIB_LIBRARY}) +qt4or5_use_modules(${QTGSTREAMER_LIBRARY} LINK_PUBLIC Core) # Build and link QtGStreamerUi add_library(${QTGSTREAMER_UI_LIBRARY} ${SHARED_OR_STATIC} ${QtGStreamerUi_SRCS}) set_target_properties(${QTGSTREAMER_UI_LIBRARY} PROPERTIES OUTPUT_NAME ${QTGSTREAMER_UI_LIBRARY}-${QTGSTREAMER_API_VERSION} SOVERSION ${QTGSTREAMER_UI_SOVERSION} VERSION ${QTGSTREAMER_VERSION}) -target_link_libraries(${QTGSTREAMER_UI_LIBRARY} ${QT_QTGUI_LIBRARY} ${QTGSTREAMER_LIBRARY} ${QtGStreamerUi_GL_LIBS}) -target_link_libraries(${QTGSTREAMER_UI_LIBRARY} LINK_INTERFACE_LIBRARIES ${QT_QTGUI_LIBRARY} ${QTGSTREAMER_LIBRARY}) +target_link_libraries(${QTGSTREAMER_UI_LIBRARY} LINK_PUBLIC ${QTGSTREAMER_LIBRARY}) +qt4or5_use_modules(${QTGSTREAMER_UI_LIBRARY} LINK_PUBLIC Widgets Gui) +qt4or5_use_modules(${QTGSTREAMER_UI_LIBRARY} LINK_PRIVATE Core) +if (Qt4or5_OpenGL_FOUND AND (OPENGL_FOUND OR OPENGLES2_FOUND)) + qt4or5_use_modules(${QTGSTREAMER_UI_LIBRARY} LINK_PRIVATE OpenGL) +endif() # Build and link QtGStreamerUtils add_library(${QTGSTREAMER_UTILS_LIBRARY} ${SHARED_OR_STATIC} ${QtGStreamerUtils_SRCS}) set_target_properties(${QTGSTREAMER_UTILS_LIBRARY} PROPERTIES OUTPUT_NAME ${QTGSTREAMER_UTILS_LIBRARY}-${QTGSTREAMER_API_VERSION} SOVERSION ${QTGSTREAMER_UTILS_SOVERSION} VERSION ${QTGSTREAMER_VERSION}) -target_link_libraries(${QTGSTREAMER_UTILS_LIBRARY} ${QTGSTREAMER_LIBRARY} ${GSTREAMER_LIBRARY} ${GSTREAMER_APP_LIBRARY}) -target_link_libraries(${QTGSTREAMER_UTILS_LIBRARY} LINK_INTERFACE_LIBRARIES ${QTGSTREAMER_LIBRARY}) +target_link_libraries(${QTGSTREAMER_UTILS_LIBRARY} LINK_PUBLIC ${QTGSTREAMER_LIBRARY}) +target_link_libraries(${QTGSTREAMER_UTILS_LIBRARY} LINK_PRIVATE ${GSTREAMER_LIBRARY} ${GSTREAMER_APP_LIBRARY}) +qt4or5_use_modules(${QTGSTREAMER_UTILS_LIBRARY} LINK_PRIVATE Core) # Install install(TARGETS ${QTGSTREAMER_LIBRARY} EXPORT ${EXPORT_TARGET_SET} ${QTGSTREAMER_INSTALL_TARGET_DEFAULT_ARGS}) diff --git a/src/QGst/QtGStreamerUi-0.10.pc.in b/src/QGst/QtGStreamerUi-0.10.pc.in index 7914ffa..731017a 100644 --- a/src/QGst/QtGStreamerUi-0.10.pc.in +++ b/src/QGst/QtGStreamerUi-0.10.pc.in @@ -5,7 +5,7 @@ includedir=${prefix}/@QTGSTREAMER_INCLUDES_INSTALL_DIR@ Name: @QTGSTREAMER_UI_LIBRARY@-0.10 Description: QtGui/QtWidgets GStreamer integration library -Requires: @PKG_CONFIG_QTGUI_DEP@ @QTGSTREAMER_LIBRARY@-0.10 +Requires: @Qt4or5_Widgets_PKGCONFIG_DEP@ @QTGSTREAMER_LIBRARY@-0.10 Version: @QTGSTREAMER_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -l@QTGSTREAMER_UI_LIBRARY@-0.10 diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index b563195..2e59b13 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -4,10 +4,8 @@ set(QtGStreamerQML_SRCS ) add_library(QtGStreamerQML MODULE ${QtGStreamerQML_SRCS}) -target_link_libraries(QtGStreamerQML - ${QTGSTREAMER_UI_LIBRARIES} - ${QT_QTDECLARATIVE_LIBRARY} -) +target_link_libraries(QtGStreamerQML ${QTGSTREAMER_UI_LIBRARIES}) +qt4or5_use_modules(QtGStreamerQML Quick1) install(TARGETS QtGStreamerQML DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer) install(FILES qmldir DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer) diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt index 2ab36ad..f86b8f7 100644 --- a/tests/auto/CMakeLists.txt +++ b/tests/auto/CMakeLists.txt @@ -1,14 +1,14 @@ -include_directories(${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} - ${QTGSTREAMER_INCLUDES} ${QT_QTTEST_INCLUDE_DIR}) +include_directories(${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${QTGSTREAMER_INCLUDES}) add_definitions(${QTGSTREAMER_DEFINITIONS} -DGST_DISABLE_XML -DGST_DISABLE_LOADSAVE) add_definitions(-DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}") macro(qgst_test target) add_executable(${target} "${target}.cpp") - target_link_libraries(${target} ${QT_QTTEST_LIBRARY} ${GSTREAMER_LIBRARY} - ${GOBJECT_LIBRARIES} ${QTGSTREAMER_LIBRARIES} + target_link_libraries(${target} ${GSTREAMER_LIBRARY} ${GOBJECT_LIBRARIES} + ${QTGSTREAMER_LIBRARIES} ${GSTREAMER_PBUTILS_LIBRARY}) + qt4or5_use_modules(${target} Test) add_test(NAME ${target} COMMAND ${target}) endmacro(qgst_test) diff --git a/tests/compilation/CompilationTests_CMakeLists.txt b/tests/compilation/CompilationTests_CMakeLists.txt index 82db935..165d80a 100644 --- a/tests/compilation/CompilationTests_CMakeLists.txt +++ b/tests/compilation/CompilationTests_CMakeLists.txt @@ -6,7 +6,8 @@ cmake_minimum_required(VERSION 2.8.9) set(CMAKE_POSITION_INDEPENDENT_CODE ON) find_package(Boost 1.39 REQUIRED) -include(QtHelpers) +find_package(Qt4or5 COMPONENTS Core REQUIRED) + include(QtGStreamerConfigCommon) include(MacroCXXCompilationTest) diff --git a/tests/manual/CMakeLists.txt b/tests/manual/CMakeLists.txt index 4156234..b07ced8 100644 --- a/tests/manual/CMakeLists.txt +++ b/tests/manual/CMakeLists.txt @@ -2,18 +2,22 @@ include_directories(${QTGSTREAMER_INCLUDES}) add_definitions(${QTGSTREAMER_DEFINITIONS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}") -qt_helper_wrap_ui(QWIDGETVIDEOSINKTEST_UI qwidgetvideosinktest.ui) +qt4or5_wrap_ui(QWIDGETVIDEOSINKTEST_UI qwidgetvideosinktest.ui) add_executable(qwidgetvideosinktest qwidgetvideosinktest.cpp ${QWIDGETVIDEOSINKTEST_UI}) -target_link_libraries(qwidgetvideosinktest ${QT_QTGUI_LIBRARY} ${QTGSTREAMER_LIBRARIES}) +target_link_libraries(qwidgetvideosinktest ${QTGSTREAMER_LIBRARIES}) +qt4or5_use_modules(qwidgetvideosinktest Core Gui Widgets) -qt_helper_wrap_ui(VIDEOWIDGETTEST_UI videowidgettest.ui) +qt4or5_wrap_ui(VIDEOWIDGETTEST_UI videowidgettest.ui) add_executable(videowidgettest videowidgettest.cpp ${VIDEOWIDGETTEST_UI}) target_link_libraries(videowidgettest ${QTGSTREAMER_UI_LIBRARIES}) +qt4or5_use_modules(videowidgettest Core Gui Widgets) -qt_helper_wrap_ui(VIDEOWIDGETPIPELINETEST_UI videowidgetpipelinetest.ui) +qt4or5_wrap_ui(VIDEOWIDGETPIPELINETEST_UI videowidgetpipelinetest.ui) add_executable(videowidgetpipelinetest videowidgetpipelinetest.cpp ${VIDEOWIDGETPIPELINETEST_UI}) target_link_libraries(videowidgetpipelinetest ${QTGSTREAMER_UI_LIBRARIES}) +qt4or5_use_modules(videowidgetpipelinetest Core Gui Widgets) -qt_helper_wrap_ui(VIDEOORIENTATIONTEST_UI videoorientationtest.ui) +qt4or5_wrap_ui(VIDEOORIENTATIONTEST_UI videoorientationtest.ui) add_executable(videoorientationtest videoorientationtest.cpp ${VIDEOORIENTATIONTEST_UI}) target_link_libraries(videoorientationtest ${QTGSTREAMER_UI_LIBRARIES}) +qt4or5_use_modules(videoorientationtest Core Gui Widgets) |