Files
GVFG_Standalone/samples/gvfg_qt_preview/CMakeLists.txt
T
Mark.lin 3f905d8a09 Add CH0 audio capture and customer runtime diagnostics
Extend the internal driver ABI and public GVFG API for combined CH0 video/audio capture, PCM format discovery, blocking copy-out reads, extra-frame wake events, and coordinated teardown of video and audio readers.

Update the Qt sample with optional CH0 audio playback on a dedicated thread, customer-visible copy/zero-copy timing telemetry, mutually exclusive CH0/CH1 Y210 selection, and a refresh-safe temporary hide for the unsupported CH1 panel.

Harden Win32 error text conversion, document the new stream and ownership contracts, and package giga_ioctl plus the VC143 runtime in customer Debug/Release bundles.

Validation: git diff --check passed before commit. No build, package execution, runtime, audio-device, or capture-hardware test was run.
2026-09-01 12:26:27 +08:00

55 lines
1.2 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(gvfg_qt_preview LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets Multimedia)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Multimedia)
set(GVFG_QT_PREVIEW_SOURCES
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
previewwindow.cpp
previewwindow.h
previewwindow.ui
)
if (QT_VERSION_MAJOR GREATER_EQUAL 6)
qt_add_executable(gvfg_qt_preview ${GVFG_QT_PREVIEW_SOURCES})
else()
add_executable(gvfg_qt_preview ${GVFG_QT_PREVIEW_SOURCES})
endif()
target_link_libraries(gvfg_qt_preview PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Multimedia
gvfg
gvfg_preview
)
target_compile_definitions(gvfg_qt_preview PRIVATE
GVFG_INTERNAL_DIAGNOSTICS=$<IF:$<CONFIG:Debug>,1,0>
)
if (MSVC)
target_compile_options(gvfg_qt_preview PRIVATE /utf-8)
endif()
add_custom_command(TARGET gvfg_qt_preview POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:gvfg>
$<TARGET_FILE_DIR:gvfg_qt_preview>
)
set_target_properties(gvfg_qt_preview PROPERTIES
WIN32_EXECUTABLE TRUE
)
install(TARGETS gvfg_qt_preview
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)