diff options
author | Jan Schmidt <jan@centricular.com> | 2017-06-22 01:01:40 +1000 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2017-06-22 01:01:40 +1000 |
commit | de26b9e5f32e8d0603716004b68cec36929c1c02 (patch) | |
tree | b7d38b40e49e96ceaea93fbd9f53295460838971 /tests/examples | |
parent | c4eabb1a87c40104237618aeb78719afbfcb88d8 (diff) | |
download | gstreamer-plugins-good-de26b9e5f32e8d0603716004b68cec36929c1c02.tar.gz |
qmlsink example: Add CMakeLists.txt
Make it possible to build using cmake instead of qmake
Diffstat (limited to 'tests/examples')
-rw-r--r-- | tests/examples/qt/qmlsink/CMakeLists.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/examples/qt/qmlsink/CMakeLists.txt b/tests/examples/qt/qmlsink/CMakeLists.txt new file mode 100644 index 000000000..02b0e11ea --- /dev/null +++ b/tests/examples/qt/qmlsink/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.3) + +include(FindPkgConfig) +if(!${PKG_CONFIG_FOUND}) + MESSAGE(FATAL_ERROR "pkg-config required. Please install it") + return ("Error - pkg-config not found") +endif() + +pkg_check_modules(GSTREAMER gstreamer-1.0>=1.6 gstreamer-video-1.0>=1.6 REQUIRED) + +find_package(Qt5Core REQUIRED) +find_package(Qt5Widgets REQUIRED) +find_package(Qt5Qml REQUIRED) +find_package(Qt5Quick REQUIRED) + +set (SRC_LIST main.cpp) +qt5_add_resources(RESOURCES qml.qrc) +link_directories(${GSTREAMER_LIBRARY_DIRS}) +include_directories (${GSTREAMER_INCLUDE_DIRS}) +add_executable(qml-example ${SRC_LIST} ${RESOURCES}) +target_link_libraries (qml-example ${GSTREAMER_LIBRARIES}) +qt5_use_modules(qml-example Core Widgets Qml Quick) + |