-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (47 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
#
# RasPi3 (BCM2837) SPI Flash storage driver
#
# Copyright (C) 2020-2024, HENSOLDT Cyber GmbH
#
# SPDX-License-Identifier: GPL-3.0-only
#
cmake_minimum_required(VERSION 3.17)
#-------------------------------------------------------------------------------
# Declare RasPi3 (BCM2837) SPI Flash Driver CAmkES Component
#
# Parameters:
#
# <name>
# required, component instance name
#
# LIBS <lib_1> <lib_2> ...
# additional libraries. At least a TimeServer client library is required
#
function(RPi_SPI_Flash_DeclareCAmkESComponent name)
cmake_parse_arguments(
PARSE_ARGV
1
RPi_SPI_Flash
""
""
"LIBS"
)
DeclareCAmkESComponent(
${name}
SOURCES
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/RPi_SPI_Flash.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/3rdParty/bcm2837/bcm2837_gpio.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/3rdParty/bcm2837/bcm2837_spi.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/3rdParty/spiflash_driver/src/spiflash.c
INCLUDES
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/3rdParty/bcm2837
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/3rdParty/spiflash/src
C_FLAGS
-Wall
-Werror
LIBS
os_core_api
lib_debug
${RPi_SPI_Flash_LIBS}
)
endfunction()