NDI input
Some checks failed
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Failing after 1m48s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
2026-05-22 16:25:56 +10:00
parent e006fcc6ee
commit 3bd6aeb52f
5 changed files with 574 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(TEST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests")
set(SLANG_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/slang-2026.8-windows-x86_64" CACHE PATH "Path to a Slang binary release containing bin/slangc.exe")
set(MSDF_ATLAS_GEN_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/msdf-atlas-gen" CACHE PATH "Path to msdf-atlas-gen binary release")
set(NDI_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/NDI 6 SDK" CACHE PATH "Path to the NDI SDK")
set(VIDEO_SHADER_INCLUDE_DIRS
"${SRC_DIR}"
@@ -38,6 +39,7 @@ set(VIDEO_SHADER_INCLUDE_DIRS
"${SRC_DIR}/video"
"${SRC_DIR}/video/core"
"${SRC_DIR}/video/decklink"
"${SRC_DIR}/video/ndi"
"${SRC_DIR}/video/playout"
)
@@ -129,6 +131,11 @@ set(MSDF_ATLAS_GEN_RUNTIME_FILES
)
set(MSDF_ATLAS_GEN_LICENSE_FILE "${MSDF_ATLAS_GEN_ROOT}/LICENSE.txt")
set(MSDF_ATLAS_GEN_README_FILE "${MSDF_ATLAS_GEN_ROOT}/README.md")
set(NDI_INCLUDE_DIR "${NDI_SDK_ROOT}/Include")
set(NDI_RUNTIME_DLL "${NDI_SDK_ROOT}/Bin/x64/Processing.NDI.Lib.x64.dll")
set(NDI_IMPORT_LIB "${NDI_SDK_ROOT}/Lib/x64/Processing.NDI.Lib.x64.lib")
set(NDI_LICENSE_FILE "${NDI_SDK_ROOT}/NDI SDK License Agreement.pdf")
set(NDI_NOTICES_FILE "${NDI_SDK_ROOT}/Bin/x64/Processing.NDI.Lib.Licenses.txt")
set(RENDER_CADENCE_APP_REQUIRED_FILES
"${SRC_DIR}/RenderCadenceCompositor.cpp"
@@ -150,6 +157,19 @@ else()
)
add_executable(RenderCadenceCompositor ${RENDER_CADENCE_APP_SOURCES})
video_shader_target_defaults(RenderCadenceCompositor)
if(EXISTS "${NDI_INCLUDE_DIR}" AND EXISTS "${NDI_IMPORT_LIB}")
target_include_directories(RenderCadenceCompositor PRIVATE "${NDI_INCLUDE_DIR}")
target_link_libraries(RenderCadenceCompositor PRIVATE "${NDI_IMPORT_LIB}")
if(EXISTS "${NDI_RUNTIME_DLL}")
add_custom_command(TARGET RenderCadenceCompositor POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${NDI_RUNTIME_DLL}"
"$<TARGET_FILE_DIR:RenderCadenceCompositor>/Processing.NDI.Lib.x64.dll"
)
endif()
else()
message(STATUS "NDI SDK headers/import library not found; NDI input backend will not build correctly: ${NDI_SDK_ROOT}")
endif()
target_link_libraries(RenderCadenceCompositor PRIVATE
opengl32
Ole32
@@ -216,6 +236,32 @@ else()
message(STATUS "Slang license file not found and will not be installed: ${SLANG_LICENSE_FILE}")
endif()
if(EXISTS "${NDI_RUNTIME_DLL}")
install(FILES "${NDI_RUNTIME_DLL}"
DESTINATION "."
)
else()
message(STATUS "NDI runtime DLL not found and will not be installed: ${NDI_RUNTIME_DLL}")
endif()
if(EXISTS "${NDI_LICENSE_FILE}")
install(FILES "${NDI_LICENSE_FILE}"
DESTINATION "third_party_notices"
RENAME "NDI_SDK_LICENSE_AGREEMENT.pdf"
)
else()
message(STATUS "NDI license file not found: ${NDI_LICENSE_FILE}")
endif()
if(EXISTS "${NDI_NOTICES_FILE}")
install(FILES "${NDI_NOTICES_FILE}"
DESTINATION "third_party_notices"
RENAME "NDI_RUNTIME_LICENSES.txt"
)
else()
message(STATUS "NDI runtime notices file not found: ${NDI_NOTICES_FILE}")
endif()
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/shaders/SHADER_CONTRACT.md"
DESTINATION "."
)