Files
kinect/tools/mock-nui-host/CMakeLists.txt
T
kinect-bot 4a66699d82
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python tracker (pytest) (push) Canceled after 0s
feat(mapping,tracker,tools): NUI mapping+smoothing, MediaPipe tracker, record/replay harness, mock NUI host (wave 3)
2026-11-25 04:21:18 -05:00

38 lines
1.4 KiB
CMake

# Standalone, Windows-only build for the mock NUI host (plan todo 16).
#
# DELIBERATELY NOT referenced by the repository root CMakeLists.txt: this target
# needs windows.h and the Kinect for Windows SDK 1.8 import library, so it can
# only be configured on Windows with MSVC. The Linux core build never sees it.
#
# Build (on a Windows box with the Kinect SDK 1.8 installed):
# cmake -S tools/mock-nui-host -B build/mock-nui-host -A Win32
# cmake --build build/mock-nui-host --config Release
# Use -A Win32 to match a 32-bit shim/game, or -A x64 for 64-bit.
cmake_minimum_required(VERSION 3.20)
project(mock_nui_host LANGUAGES CXX)
if(NOT WIN32)
message(FATAL_ERROR "mock-nui-host is Windows-only (needs the Kinect SDK 1.8); do not build it on Linux.")
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(mock_nui_host mock_nui_host.cpp)
# Kinect for Windows SDK 1.8 (KINECTSDK10_DIR is set by the SDK installer).
set(KINECT_SDK_DIR "$ENV{KINECTSDK10_DIR}" CACHE PATH "Kinect for Windows SDK 1.8 root")
if(NOT KINECT_SDK_DIR)
message(FATAL_ERROR "KINECTSDK10_DIR not set; install the Kinect for Windows SDK 1.8.")
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(KINECT_ARCH "amd64")
else()
set(KINECT_ARCH "x86")
endif()
target_include_directories(mock_nui_host PRIVATE "${KINECT_SDK_DIR}/inc")
target_link_libraries(mock_nui_host PRIVATE "${KINECT_SDK_DIR}/lib/${KINECT_ARCH}/Kinect10.lib")