Changeset View
Changeset View
Standalone View
Standalone View
demos/simplecapture/CMakeLists.txt
1 | project(simplecapture) | 1 | project(simplecapture) | ||
---|---|---|---|---|---|
2 | cmake_minimum_required(VERSION 2.6.9 FATAL_ERROR) | 2 | cmake_minimum_required(VERSION 2.6.9 FATAL_ERROR) | ||
3 | 3 | | |||
4 | find_package(Phonon REQUIRED) | 4 | find_package(Phonon REQUIRED) | ||
5 | 5 | | |||
6 | add_definitions(${QT_DEFINITIONS} ${PHONON_DEFINITIONS}) | 6 | add_definitions(${QT_DEFINITIONS} ${PHONON_DEFINITIONS}) | ||
7 | include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${PHONON_INCLUDES}) | 7 | include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${PHONON_INCLUDES}) | ||
8 | 8 | | |||
9 | set(simplecapture_SRCS | 9 | set(simplecapture_SRCS | ||
10 | main.cpp | 10 | main.cpp | ||
11 | capture.cpp | 11 | capture.cpp | ||
12 | ) | 12 | ) | ||
13 | 13 | | |||
14 | phonon_add_executable(simplecapture ${simplecapture_SRCS}) | 14 | phonon_add_executable(simplecapture ${simplecapture_SRCS}) | ||
15 | 15 | | |||
16 | qt5_use_modules(simplecapture Core Widgets) | 16 | if(PHONON_BUILD_PHONON4QT5) | ||
17 | target_link_libraries(simplecapture ${PHONON_LIBRARY}) | 17 | target_link_libraries(simplecapture Qt5::Core Qt5::Widgets ${PHONON_LIBRARY}) | ||
18 | else() | ||||
19 | target_link_libraries(simplecapture ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${PHONON_LIBRARY}) | ||||
20 | endif() |