-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
55 lines (40 loc) · 1.66 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
cmake_minimum_required(VERSION 3.13)
###############################################################################
## PROJECT
## name and version
###############################################################################
project(RF62X-Protocol LANGUAGES C)
###############################################################################
## SETTINGS
## basic project settings before use
###############################################################################
# If this project is used as a submodule, the variable should be overridden
# to "OFF" in the top-level application (to disable forced cache rewriting)
option(${PARENT}_SUBMODULE_CACHE_OVERWRITE "Enable forced cache rewriting" ON)
if (${PARENT}_SUBMODULE_CACHE_OVERWRITE)
SET(REWRITE_FORCE "FORCE")
else()
SET(REWRITE_FORCE "")
endif()
###############################################################################
## CONFIGURATION
## project configuration
###############################################################################
# library src
SET(${PARENT}_RF62X_PROTOCOL_LIB ON CACHE BOOL "" ${REWRITE_FORCE})
# Examples
SET(${PARENT}_RF62X_PROTOCOL_EXAMPLES ON CACHE BOOL "" ${REWRITE_FORCE})
###############################################################################
## INCLUDING SUBDIRECTORIES
## Adding subdirectories according to the configuration
###############################################################################
if (${PARENT}_RF62X_PROTOCOL_LIB)
# 3rdparty
add_subdirectory(3rdparty)
# library src
add_subdirectory(src)
# Tests
if (${PARENT}_RF62X_PROTOCOL_EXAMPLES)
add_subdirectory(examples)
endif()
endif()