-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
58 lines (45 loc) · 1.58 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
cmake_minimum_required(VERSION 3.22)
include(cmake/prelude.cmake)
project(
Sts1CobcSw
VERSION 0.1.0
DESCRIPTION "Software for the communication and onboard computer of SpaceTeamSat1"
HOMEPAGE_URL "https://github.com/SpaceTeam/STS1_COBC_SW"
LANGUAGES CXX
)
include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)
include(cmake/custom-commands.cmake)
include(cmake/clang-tidy-cache.cmake)
include(cmake/ccache.cmake)
include(cmake/rodos-without-main-on-linux.cmake)
# ---- Find dependencies ----
find_package_and_notify(etl)
find_rodos()
find_package_and_notify(littlefs)
find_package_and_notify(strong_type)
# ---- Declare targets ----
add_library(Sts1CobcSw_Dummy STATIC)
add_library(Sts1CobcSw_Edu STATIC)
add_library(Sts1CobcSw_FileSystem STATIC)
add_library(Sts1CobcSw_FramSections INTERFACE)
add_library(Sts1CobcSw_Hal STATIC)
add_library(Sts1CobcSw_Outcome INTERFACE)
add_library(Sts1CobcSw_ProgramId INTERFACE)
add_library(Sts1CobcSw_Periphery STATIC)
add_library(Sts1CobcSw_Serial INTERFACE)
add_library(Sts1CobcSw_Utility STATIC)
add_program(HelloDummy)
if(CMAKE_SYSTEM_NAME STREQUAL Generic)
add_program(CobcSoftware)
endif()
# All targets must only add the top level project directory as PUBLIC include directory
all_targets_include_directories("$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>")
add_subdirectory(${PROJECT_NAME})
# ---- Developer mode ----
if(NOT Sts1CobcSw_DEVELOPER_MODE)
return()
elseif(NOT PROJECT_IS_TOP_LEVEL)
message(AUTHOR_WARNING "Developer mode is intended for developers of CobcSw")
endif()
include(cmake/dev-mode.cmake)