Files
GVFG_Standalone/GVFG_SDK/CMakeLists.txt
T
Mark.lin b4403fe59a Release SDK 1.1.0 with bounded OSD placement and delivery diagnostics
- expose stateless OSD text measurement and use matching single-line glyph bounds, overhang, and guard pixels to clamp placement within each frame without wrapping or truncating oversized text

- reuse the held SDK-owned capture buffer for non-zero-copy OSD, preserve its stride and size, and overwrite only the GPU-processed rectangle while retaining the backend hold until application release

- add internal timed and profiled frame reads with acquisition timing after the frame event wait, per-stage OSD wall times, and unchanged public frame timestamps and existing timing layouts

- isolate driver-buffer writes behind a default-OFF experimental build option, validate committed writable pages before ROI writes, retain independent-output fallback, and expose per-frame rejection details without changing vendor release rules

- bump the SDK version from 1.0.2 to 1.1.0 and document minor-version feature releases, patch-version bug fixes, placement behavior, ownership, diagnostics, and experimental DMA limitations

Validation: git diff --cached --check passed before commit. No SDK rebuild or Customer Demo regression suite was run in this commit pass. User-provided capture logs exercised delivery diagnostics and showed PAGE_READONLY fallback; successful driver-buffer writes and DMA ownership safety remain unverified.
2026-10-19 16:41:15 +08:00

64 lines
2.0 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(gvfg_sdk LANGUAGES CXX)
# Version policy: new features bump MINOR and reset PATCH; bug fixes bump PATCH.
set(GVFG_SDK_VERSION "1.1.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)
install(FILES
../docs/GVFG_CUSTOMER_API.md
../docs/GVFG_Customer_doc/GVFG_CUSTOMER_API_REFERENCE.md
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)