Files
tinyUSB/examples/host/midi_rx/CMakeLists.txt

33 lines
897 B
CMake
Raw Permalink Normal View History

2025-02-12 11:50:57 +07:00
cmake_minimum_required(VERSION 3.20)
2022-09-08 21:13:55 +02:00
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
2025-02-12 11:50:57 +07:00
# gets PROJECT name for the example
2022-09-08 21:13:55 +02:00
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
2025-02-12 11:50:57 +07:00
project(${PROJECT} C CXX ASM)
2022-09-08 21:13:55 +02:00
# Checks this example is valid for the family and initializes the project
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
2025-02-12 11:50:57 +07:00
# Espressif has its own cmake build system
if(FAMILY STREQUAL "espressif")
return()
endif()
2022-09-08 21:13:55 +02:00
add_executable(${PROJECT})
# Example source
target_sources(${PROJECT} PUBLIC
2025-02-12 11:50:57 +07:00
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
)
2022-09-08 21:13:55 +02:00
# Example include
target_include_directories(${PROJECT} PUBLIC
2025-02-12 11:50:57 +07:00
${CMAKE_CURRENT_SOURCE_DIR}/src
)
2022-09-08 21:13:55 +02:00
2025-02-12 11:50:57 +07:00
# Configure compilation flags and libraries for the example without RTOS.
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
family_configure_host_example(${PROJECT} noos)