blob: 27e57150f0bf1dd8008f1578a86fec79a79747db (
plain)
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
|
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(
player
VERSION 1.0
DESCRIPTION "The code for the soccer player robot. https://github.com/mendelcollege-robotics/robotica"
LANGUAGES C
)
#[===[
# Create a static library target named "my_lib"
add_library(my_lib
STATIC
src/my_lib.c
)
target_include_directories(
my_lib
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
)
# Create an executable target with the same name as the project name
add_executable(
${PROJECT_NAME}
src/main.c
)
# Link the library to the executable. PRIVATE means that the library is not
# exposed to targets that depend on this target.
target_link_libraries(
${PROJECT_NAME}
PRIVATE
my_lib
)
]===]
target_sources(app PRIVATE src/main.c)
|