forked from lobaro/lobaro-coap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (22 loc) · 1.02 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
if (DEFINED __INIT_LOBARO_BUILD)
# cmake configuration used in lobaro's internal build configuration
project(lobaro-coap)
include(${CPATH}/src/github.com/lobaro/c-build/build.cmake)
add_definitions(
# this must be an array, e.g. {5,10,15} or {20}
# no quotes
# if there are more retries than entries, last entry of array will be used
-DCOAP_EXPLICIT_TIMEOUTS={20}
-DCOAP_MAX_RETRANSMIT=2
)
cbuild_module("lobaro/lobaro-coap/test")
# cbuild_dependency(_ github.com/lobaro/cpp-utils)
else()
# general cmake configuration used outside of lobaro
cmake_minimum_required(VERSION 3.1)
project(lobaro_coap C)
file(GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/src/*.h ${CMAKE_CURRENT_LIST_DIR}/src/*.c)
add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES} src/liblobaro_coap.c)
target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_LIST_DIR}/src)
set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 99)
endif()