File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,11 @@ project(lib_bluetoe CXX)
7
7
8
8
option (BLUETOE_BUILD_UNIT_TESTS "If true, unit test targets are added are build." )
9
9
10
+ # Libray required by everything in Bluetoe. If there is need to add build options,
11
+ # add them on bluetoe::iface.
10
12
add_library (bluetoe_iface INTERFACE )
11
- target_compile_features (bluetoe_iface INTERFACE cxx_std_11 )
12
13
add_library (bluetoe::iface ALIAS bluetoe_iface )
14
+ target_compile_features (bluetoe_iface INTERFACE cxx_std_11 )
13
15
target_include_directories (bluetoe_iface INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} )
14
16
15
17
# Link Layer implementation based on radio hardware
Original file line number Diff line number Diff line change @@ -10,8 +10,13 @@ if (NOT CMAKE_CROSSCOMPILING)
10
10
message (FATAL_ERROR " examples can only be cross compiled to arm cortex-m, missing -Dtoolchain_file on cmake invocation?" )
11
11
endif ()
12
12
13
+ set (AVAILABLE_BINDINGS nrf51 nrf52 )
14
+
15
+ set (BINDING nrf52 CACHE STRING "Microcontroller target to build for" )
16
+ set_property (CACHE BINDING PROPERTY STRINGS ${AVAILABLE_BINDINGS} )
17
+
13
18
if (NOT BINDING )
14
- message (FATAL_ERROR " A binding must be defined. Use -DBINDING=nrf51. Current available bindings are nrf51, nrf52 " )
19
+ message (FATAL_ERROR " A binding must be defined. Use -DBINDING=nrf51. Current available bindings are ${AVAILABLE_BINDINGS} " )
15
20
endif ()
16
21
17
22
# include hardware specific compile options and definitions that must be apllied to the whole project
@@ -50,6 +55,9 @@ add_subdirectory(assert)
50
55
# bluetoe library
51
56
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /.. ${CMAKE_CURRENT_BINARY_DIR} /bluetoe )
52
57
58
+ # Additional settings for the Bluetoe library itself:
59
+ target_link_libraries (bluetoe_iface INTERFACE assert::arm )
60
+
53
61
function (add_bluetoe_example target_name )
54
62
add_executable (${target_name} ${target_name} .cpp runtime.cpp )
55
63
set_target_properties (${target_name}
You can’t perform that action at this time.
0 commit comments