set(TRACK_CORE_SOURCES src/memory_strip.cpp src/model.cpp src/pid_program.cpp src/render.cpp src/scheme_decoder.cpp ) if(DEFINED IDF_TARGET) idf_component_register( SRCS ${TRACK_CORE_SOURCES} INCLUDE_DIRS include ) else() cmake_minimum_required(VERSION 3.20) project(track_core VERSION 0.1.0 LANGUAGES CXX) add_library(track_core ${TRACK_CORE_SOURCES}) add_library(track_core::track_core ALIAS track_core) target_include_directories(track_core PUBLIC $ $ ) target_compile_features(track_core PUBLIC cxx_std_23) option(TRACK_CORE_BUILD_TESTS "Build track-core tests" ON) if(TRACK_CORE_BUILD_TESTS) enable_testing() add_executable(track_core_tests tests/track_core_tests.cpp) target_link_libraries(track_core_tests PRIVATE track_core::track_core) target_compile_features(track_core_tests PRIVATE cxx_std_23) add_test(NAME track_core_tests COMMAND track_core_tests) endif() add_executable(track_core_render_demo examples/render_demo.cpp) target_link_libraries(track_core_render_demo PRIVATE track_core::track_core) target_compile_features(track_core_render_demo PRIVATE cxx_std_23) endif()