meson: add build files for the qml plugin
[platform/upstream/gstreamer.git] / tests / examples / qt / qmlsink / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.3)
2
3 include(FindPkgConfig)
4 if(!${PKG_CONFIG_FOUND})
5   MESSAGE(FATAL_ERROR "pkg-config required. Please install it")
6   return ("Error - pkg-config not found")
7 endif()
8
9 pkg_check_modules(GSTREAMER gstreamer-1.0>=1.6 gstreamer-video-1.0>=1.6 REQUIRED)
10
11 find_package(Qt5Core REQUIRED)
12 find_package(Qt5Widgets REQUIRED)
13 find_package(Qt5Qml REQUIRED)
14 find_package(Qt5Quick REQUIRED)
15
16 set (SRC_LIST main.cpp)
17 qt5_add_resources(RESOURCES qmlsink.qrc)
18 link_directories(${GSTREAMER_LIBRARY_DIRS})
19 include_directories (${GSTREAMER_INCLUDE_DIRS})
20 add_executable(qml-example ${SRC_LIST} ${RESOURCES})
21 target_link_libraries (qml-example ${GSTREAMER_LIBRARIES})
22 qt5_use_modules(qml-example Core Widgets Qml Quick)
23