-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
59 lines (43 loc) · 1.33 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#-------------------------------------------------------------------------------
# Zephyr Cerebri Application
#
# Copyright (c) 2023 CogniPilot Foundation
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.13.1)
if (${BOARD} STREQUAL "mr_canhubk3")
message(STATUS "enabling mr_canhubk3_adap shield")
set(SHIELD mr_canhubk3_adap)
endif()
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(b3rb LANGUAGES C)
target_compile_options(app PRIVATE -Wall -Wextra -Werror)
set_source_files_properties(src/casadi/gen/b3rb.c PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
set(SOURCE_FILES src/main.c)
if (CONFIG_CEREBRI_B3RB_FSM)
list(APPEND SOURCE_FILES src/fsm.c)
endif()
if (CONFIG_CEREBRI_B3RB_ESTIMATE)
list(APPEND SOURCE_FILES src/estimate.c)
endif()
if (CONFIG_CEREBRI_B3RB_MIXING)
list(APPEND SOURCE_FILES src/mixing.c)
endif()
if (CONFIG_CEREBRI_B3RB_LIGHTING)
list(APPEND SOURCE_FILES src/lighting.c)
endif()
if (CONFIG_CEREBRI_B3RB_MANUAL)
list(APPEND SOURCE_FILES src/manual.c)
endif()
if (CONFIG_CEREBRI_B3RB_POSITION)
list(APPEND SOURCE_FILES
src/position.c)
endif()
if (CONFIG_CEREBRI_B3RB_VELOCITY)
list(APPEND SOURCE_FILES
src/velocity.c)
endif()
if (CONFIG_CEREBRI_B3RB_CASADI)
list(APPEND SOURCE_FILES
src/casadi/gen/b3rb.c)
endif()
target_sources(app PRIVATE ${SOURCE_FILES})