diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-10-21 16:00:21 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-10-28 13:18:00 +0100 |
commit | c326d554b22a24e2755cf80ebd6a2a3b49caabc2 (patch) | |
tree | 25da12ef65d6d505883ebc0106be867f8bd62bbc /examples/qmlplayer2/CMakeLists.txt | |
parent | d272518ef8999970a242d22f225f1f9d016d08d5 (diff) |
examples: Add a qtquick2 player example
Diffstat (limited to 'examples/qmlplayer2/CMakeLists.txt')
-rw-r--r-- | examples/qmlplayer2/CMakeLists.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/qmlplayer2/CMakeLists.txt b/examples/qmlplayer2/CMakeLists.txt new file mode 100644 index 0000000..cbd58ee --- /dev/null +++ b/examples/qmlplayer2/CMakeLists.txt @@ -0,0 +1,30 @@ +project(qtgst-example-qmlplayer2) + +if (NOT BUILDING_QTGSTREAMER) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules) + find_package(Qt4or5 COMPONENTS Core Gui Quick2 Qml REQUIRED) + find_package(Qt5GStreamer REQUIRED) + + set(CMAKE_AUTOMOC ON) + set(CMAKE_INCLUDE_CURRENT_DIR ON) +else() + # allow the example to run from the build tree without installing QtGStreamer + add_definitions( + -DQTVIDEOSINK_PATH="${QtGStreamer_BINARY_DIR}/elements/gstqtvideosink" + -DUNINSTALLED_IMPORTS_DIR="${QtGStreamer_BINARY_DIR}/src/qml/quick2" + ) +endif() + +include_directories(${QTGSTREAMER_INCLUDES}) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}") +add_definitions(${QTGSTREAMER_DEFINITIONS}) + +set(qmlplayer2_SOURCES main.cpp player.cpp) +qt4or5_add_resources(qmlplayer2_rcc_SOURCES qmlplayer2.qrc) + +add_executable(qmlplayer2 + ${qmlplayer2_SOURCES} + ${qmlplayer2_rcc_SOURCES} +) +target_link_libraries(qmlplayer2 ${QTGSTREAMER_QUICK_LIBRARIES}) +qt4or5_use_modules(qmlplayer2 Core Gui Quick2 Qml) |