Files
kinect/CMakeLists.txt
T
kinect-botandsisyphus-dev-ai b38c7bcd82
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python tracker (pytest) (push) Canceled after 0s
chore(scaffold): project layout, cross-platform build, CI
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-25 03:23:45 -05:00

45 lines
1.8 KiB
CMake

cmake_minimum_required(VERSION 3.20)
project(virtual_kinect_core LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# ---------------------------------------------------------------------------
# libnui_core: OS-agnostic static library aggregating the pure core modules.
# Real logic arrives per plan todos 2 (contract), 6 (mapping), 7 (synth);
# these sources are compile/link placeholders today.
# ---------------------------------------------------------------------------
add_library(libnui_core STATIC
core/contract/contract.cpp
core/mapping/mapping.cpp
core/synth/synth.cpp
)
# Keep the on-disk name libnui_core.a (not liblibnui_core.a).
set_target_properties(libnui_core PROPERTIES PREFIX "" OUTPUT_NAME "libnui_core")
target_include_directories(libnui_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/core)
# ---------------------------------------------------------------------------
# Tests: GoogleTest via FetchContent + CTest. One trivial passing test today.
# ---------------------------------------------------------------------------
option(NUI_CORE_BUILD_TESTS "Build libnui_core unit tests" ON)
if(NUI_CORE_BUILD_TESTS)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz
URL_HASH SHA256=7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
# Honour the parent project's C runtime selection on Windows/MSVC.
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
enable_testing()
add_executable(libnui_core_tests tests/test_core.cpp)
target_link_libraries(libnui_core_tests PRIVATE libnui_core GTest::gtest_main)
include(GoogleTest)
gtest_discover_tests(libnui_core_tests)
endif()