feat: separate customer and internal diagnostics

This commit is contained in:
Mark.lin
2026-07-27 14:49:57 +08:00
parent 747209fa87
commit 5662d74df9
11 changed files with 322 additions and 75 deletions
+23 -1
View File
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.16)
project(gvfg_standalone VERSION 0.1.0 LANGUAGES CXX)
include(GNUInstallDirs)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -16,6 +18,13 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
option(BUILD_GVFG_SAMPLES "Build GVFG customer samples" ON)
option(GVFG_ENABLE_INTERNAL_DEBUG_API "Export internal GVFG diagnostic APIs" OFF)
option(BUILD_GVFG_INTERNAL_TOOLS "Build internal driver/FPGA diagnostic tools" OFF)
if (BUILD_GVFG_INTERNAL_TOOLS AND NOT GVFG_ENABLE_INTERNAL_DEBUG_API)
message(FATAL_ERROR
"BUILD_GVFG_INTERNAL_TOOLS requires GVFG_ENABLE_INTERNAL_DEBUG_API=ON")
endif()
if (NOT WIN32)
message(FATAL_ERROR "GVFG currently supports Windows only.")
@@ -25,6 +34,19 @@ add_subdirectory(sdk/gvfg)
add_subdirectory(helpers/gvfg_preview)
add_subdirectory(helpers/gvfg_convert)
if (BUILD_GVFG_SAMPLES)
if (BUILD_GVFG_SAMPLES OR BUILD_GVFG_INTERNAL_TOOLS)
add_subdirectory(samples/gvfg_qt_preview)
endif()
install(FILES
docs/GVFG_CUSTOMER_API.md
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
if (GVFG_ENABLE_INTERNAL_DEBUG_API)
install(FILES
README.md
docs/GVFG_INTERNAL_NOTES.md
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
endif()