Compared with f612cfd:
- Move the capture SDK, private IOCTL wrapper, and optional preview helper under GVFG_SDK with an independent top-level CMake project and version source.
- Move the Qt preview application into GVFG_Qt_Sample and consume prebuilt SDK DLLs and compiler-specific import libraries through imported CMake targets instead of compiling SDK sources as subdirectories.
- Resolve Qt Creator configuration-specific SDK build directories automatically, copy the three runtime DLLs beside the sample executable, and keep missing MSVC or MinGW artifacts as explicit configure errors.
- Update Release and Debug packaging scripts to read SDK and sample outputs separately, and update the repository build instructions for the two-project workflow.
- Preserve the pre-existing uncommitted device display-name suffix change outside this commit.
Validation: independent MSVC SDK configure/build and independent Qt MSVC sample configure/build passed; the sample build graph contains no SDK implementation sources; git diff --check passed. No MinGW link, runtime launch, capture, audio playback, or hardware validation was run.
69 lines
1.7 KiB
CMake
69 lines
1.7 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
|
|
include/gvfg_capture.h
|
|
include/gvfg_debug.h
|
|
src/backend/pcies2mm/pcies2mm_backend_types.h
|
|
src/backend/pcies2mm/pcies2mm_capture_session.cpp
|
|
src/backend/pcies2mm/pcies2mm_capture_session.h
|
|
src/backend/pcies2mm/pcies2mm_device.cpp
|
|
src/backend/pcies2mm/pcies2mm_device.h
|
|
src/backend/pcies2mm/pcies2mm_reg.h
|
|
src/backend/pcies2mm/pcies2mm_video_format.cpp
|
|
src/backend/pcies2mm/pcies2mm_video_format.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/backend/pcies2mm
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/gpu
|
|
)
|
|
|
|
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
|
|
giga_ioctl
|
|
setupapi
|
|
user32
|
|
dxgi
|
|
d3d11
|
|
D3DCompiler
|
|
)
|
|
|
|
if (MSVC)
|
|
target_compile_options(gvfg PRIVATE /utf-8 /EHsc)
|
|
endif()
|
|
|
|
install(TARGETS gvfg
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
)
|
|
|
|
install(FILES include/gvfg_capture.h
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
)
|