-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy pathCMakeLists.txt
61 lines (55 loc) · 1.37 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
60
61
set(srcs
src/LoRaMac.c
src/aes.c
src/LoRaMacCrypto.c
src/Mcu.S
src/gpio.c
src/board.c
src/delay.c
src/gpio-board.c
src/cmac.c
src/OLEDDisplay.cpp
src/fifo.c
src/timer.S
src/region/RegionUS915-Hybrid.c
src/region/RegionAU915.c
src/region/RegionCN470.c
src/region/RegionAS923.c
src/region/Region.c
src/region/RegionCN779.c
src/region/RegionLA915.c
src/region/RegionEU868.c
src/region/RegionKR920.c
src/region/RegionEU433.c
src/region/RegionCommon.c
src/region/RegionIN865.c
src/region/RegionUS915.c
src/rtc-board.S
src/sensor/HDC1080.cpp
src/ESP32_LoRaWAN.cpp
src/utilities.c
src/OLEDDisplayUi.cpp
src/sx1276-board.c
src/sx1276.c
src/LoRaMacConfirmQueue.c
)
set(includedirs
src
src/region
src/sensor
)
set(priv_includes )
set(requires arduino)
set(priv_requires )
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
function(maybe_add_component component_name)
idf_build_get_property(components BUILD_COMPONENTS)
if (${component_name} IN_LIST components)
idf_component_get_property(lib_name ${component_name} COMPONENT_LIB)
target_link_libraries(${COMPONENT_LIB} PUBLIC ${lib_name})
endif()
endfunction()
maybe_add_component(arduino)
target_compile_options(${COMPONENT_TARGET} PUBLIC
-DESP32 -DLORAWAN_PREAMBLE_LENGTH=${CONFIG_LORAWAN_PREAMBLE_LENGTH}
)