Files
GVFG_Standalone/GVFG_SDK/CMakeLists.txt
T
Mark.lin c8b2d0608a Add dual-slot font-selectable OSD and privatize playback diagnostics for SDK 3.0.0
- replace the single-overlay API with two independently configured OSD slots per channel, simplify NUL-terminated text/font settings, and add explicit visibility controls that preserve cached glyphs separately from Clear

- enumerate installed Windows font families as an SDK-owned UTF-8 list without callbacks or caller-side free, refresh installed fonts on demand, and use the selected family consistently for measurement and rendering with invalid/missing-font rejection

- retain per-slot YUV and A8 mask caches, blend slot 1 over slot 0 in one GPU dispatch/readback, preserve hidden surfaces, and skip oversized slots independently while capture and the other slot continue

- move detailed playback core statistics to a private Debug-only header/export, remove the public legacy statistics query and compatibility layouts, and retain public preview/delivery statistics

- bump the SDK major version to 3.0.0 for the breaking OSD and playback API changes and document matching header, import-library and runtime deployment requirements

- refresh the capture/playback guides, internal build notes and API reference, document all 51 public Capture/Playback functions, add checked OSD usage examples, and regenerate the branded 23-page PDF

Validation: git diff --cached --check and public API documentation coverage checks passed. The regenerated PDF passed text/content checks and visual review of its rendered pages, including the OSD types, API contracts and examples. Earlier session SDK Release compilation and synthetic YUY2/Y210 blending checks passed; no new build, hardware capture, FPGA upload or long-duration runtime validation was performed during this commit pass.
2026-10-29 09:02:54 +08:00

68 lines
2.2 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(gvfg_sdk LANGUAGES CXX)
# Version policy: breaking public API changes bump MAJOR; features bump MINOR; fixes bump PATCH.
set(GVFG_SDK_VERSION "3.0.0")
option(GVFG_EXPERIMENTAL_ZERO_COPY_OSD_INPLACE
"UNSAFE local experiment: write OSD into driver zero-copy buffers" OFF)
if (GVFG_EXPERIMENTAL_ZERO_COPY_OSD_INPLACE)
message(WARNING "EXPERIMENTAL driver-buffer writes enabled. Writable pages do not guarantee DMA ownership. Do not ship this build.")
endif()
include(GNUInstallDirs)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC OFF)
set(CMAKE_AUTOUIC OFF)
set(CMAKE_AUTORCC OFF)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(GVFG_MINGW_DLLTOOL "" CACHE FILEPATH
"MinGW dlltool used to generate GNU import libraries from the MSVC DLL exports")
if (MSVC AND NOT GVFG_MINGW_DLLTOOL)
find_program(_GVFG_MINGW_DLLTOOL_FOUND
NAMES dlltool.exe x86_64-w64-mingw32-dlltool.exe
HINTS
"C:/Qt/Tools/mingw1310_64/bin"
"C:/Qt/Tools/mingw1120_64/bin"
NO_CACHE
)
if (_GVFG_MINGW_DLLTOOL_FOUND)
set(GVFG_MINGW_DLLTOOL "${_GVFG_MINGW_DLLTOOL_FOUND}" CACHE FILEPATH
"MinGW dlltool used to generate GNU import libraries from the MSVC DLL exports" FORCE)
endif()
endif()
if (MSVC AND NOT GVFG_MINGW_DLLTOOL)
message(WARNING
"MinGW dlltool was not found. MSVC libraries will be built, but GNU "
"import libraries for MinGW consumers will not be generated. Set "
"GVFG_MINGW_DLLTOOL to enable them.")
endif()
if (NOT WIN32)
message(FATAL_ERROR "GVFG SDK currently supports Windows only.")
endif()
add_subdirectory(helpers/gvfg_osd)
add_subdirectory(sdk/gvfg)
add_subdirectory(helpers/gvfg_preview)
add_subdirectory(helpers/gvfg_audio_playback)
add_subdirectory(helpers/gvfg_playback)
install(FILES
../docs/GVFG_CUSTOMER_API.md
../docs/GVFG_PLAYBACK_API.md
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
install(FILES ../docs/GVFG_Customer_doc/GVFG_CUSTOMER_API_REFERENCE.md
DESTINATION ${CMAKE_INSTALL_DOCDIR}/GVFG_Customer_doc
)