Compared with a04bd61:
- Restore the existing gvfg_set_channel_video_format API and the Qt sample YUY2/Y210 output-format controls with the original dual-channel Y210 restriction.
- Restore gvfg_debug_read_register, gvfg_debug_write_register, and the original gvfg_debug_get_channel_backend_stats names and fields so the established internal API remains compatible.
- Implement the three missing operations through a small in-process driver extension using the existing register read/write requests; capture, audio, events, signal queries, copy, and zero-copy paths continue to use GvfgSdk.lib.
- Mark every fallback as a GIGABYTELIB GAP and add a focused gap report requesting official format-selection and diagnostic register APIs from the GigabyteLib owner.
- Remove empty legacy backend and giga_ioctl directories without restoring giga_ioctl.dll or a second capture backend.
Validation: git diff --cached --check passed. MSVC x64 Release and Debug gvfg.dll builds passed, the Release Qt sample rebuilt and linked successfully, dumpbin confirmed all original 32 exports are present, and the Release package contains gvfg.dll without giga_ioctl.dll or private GigabyteLib files. The actual register operations, output-format switching, capture, audio, zero-copy, hot-plug, dual-channel behavior, shutdown, MinGW, and hardware behavior were not runtime-tested.
88 lines
2.3 KiB
CMake
88 lines
2.3 KiB
CMake
# Inherit the version from the standalone root project. The root project()
|
|
# declaration is the single source of truth for the public SDK version.
|
|
set(_GVFG_VERSION "${PROJECT_VERSION}")
|
|
project(gvfg VERSION ${_GVFG_VERSION} LANGUAGES CXX)
|
|
|
|
add_library(gvfg SHARED
|
|
gvfg.def
|
|
include/gvfg_capture.h
|
|
include/gvfg_debug.h
|
|
src/gigabyte/gigabyte_types.h
|
|
src/gigabyte/gigabyte_capture_session.cpp
|
|
src/gigabyte/gigabyte_capture_session.h
|
|
src/gigabyte/gigabyte_driver_extensions.cpp
|
|
src/gigabyte/gigabyte_driver_extensions.h
|
|
src/gigabyte/gigabyte_device.cpp
|
|
src/gigabyte/gigabyte_device.h
|
|
src/gpu/d3d_conversion_pipeline.cpp
|
|
src/gpu/d3d_conversion_pipeline.h
|
|
src/gpu/gvfg_gpu_convert.cpp
|
|
src/gvfg_error_state.h
|
|
src/gvfg_capture.cpp
|
|
)
|
|
|
|
set_target_properties(gvfg PROPERTIES
|
|
AUTOMOC OFF
|
|
AUTOUIC OFF
|
|
AUTORCC OFF
|
|
)
|
|
|
|
target_include_directories(gvfg
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/gigabyte
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/gpu
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/GigabyteLib
|
|
)
|
|
|
|
target_compile_definitions(gvfg PRIVATE
|
|
GVFG_BUILD
|
|
GVFG_VERSION_STRING="${PROJECT_VERSION}"
|
|
)
|
|
|
|
target_compile_definitions(gvfg PRIVATE
|
|
GVFG_INTERNAL_DIAGNOSTICS=$<IF:$<CONFIG:Debug>,1,0>
|
|
)
|
|
|
|
target_link_libraries(gvfg PRIVATE
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/GigabyteLib/GvfgSdk.lib"
|
|
setupapi
|
|
user32
|
|
dxgi
|
|
d3d11
|
|
D3DCompiler
|
|
)
|
|
|
|
if (MSVC)
|
|
target_compile_options(gvfg PRIVATE /utf-8 /EHsc)
|
|
endif()
|
|
|
|
if (MSVC AND GVFG_MINGW_DLLTOOL)
|
|
add_custom_command(TARGET gvfg POST_BUILD
|
|
COMMAND "${GVFG_MINGW_DLLTOOL}"
|
|
-d "${CMAKE_CURRENT_SOURCE_DIR}/gvfg.def"
|
|
-D gvfg.dll
|
|
-l libgvfg.dll.a
|
|
WORKING_DIRECTORY "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
|
|
COMMENT "Generating MinGW import library for gvfg.dll"
|
|
VERBATIM
|
|
)
|
|
endif()
|
|
|
|
install(TARGETS gvfg
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
)
|
|
|
|
install(FILES include/gvfg_capture.h
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
)
|
|
|
|
if (MSVC AND GVFG_MINGW_DLLTOOL)
|
|
install(FILES "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libgvfg.dll.a"
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
)
|
|
endif()
|