diff options
Diffstat (limited to 'examples/player/CMakeLists.txt')
-rw-r--r-- | examples/player/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
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) |