mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-30 07:21:20 +00:00
cmake: added all examples
This commit is contained in:
parent
77770ef51c
commit
f84311b3d3
3
3rd-party/hxcmod-player/CMakeLists.txt
vendored
Normal file
3
3rd-party/hxcmod-player/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
add_library( hxcmod-player hxcmod.c mods/nao-deceased_by_disease.c hxcmod.h )
|
||||
target_include_directories( hxcmod-player PUBLIC . )
|
||||
target_include_directories( hxcmod-player PUBLIC mods )
|
2
3rd-party/md5/CMakeLists.txt
vendored
Normal file
2
3rd-party/md5/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
add_library( md5 STATIC md5.c md5.h )
|
||||
target_include_directories( md5 PUBLIC . )
|
@ -1,10 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
project(
|
||||
BTStackBase
|
||||
VERSION 1.0
|
||||
DESCRIPTION "Dual-mode Bluetooth stack, with small memory footprint."
|
||||
LANGUAGES C)
|
||||
BTstack
|
||||
VERSION 1.0
|
||||
DESCRIPTION "Dual-mode Bluetooth stack, with small memory footprint."
|
||||
LANGUAGES C)
|
||||
|
||||
set(BTSTACK_PORT libusb CACHE STRING "Use sepcified port for the examples to build with")
|
||||
set_property(CACHE BTSTACK_PORT PROPERTY STRINGS libusb zephyr)
|
||||
@ -28,14 +28,23 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||
#include(CTest)
|
||||
|
||||
# Docs only available if this is the main app
|
||||
find_package(Doxygen)
|
||||
if(Doxygen_FOUND)
|
||||
add_subdirectory(docs)
|
||||
else()
|
||||
message(STATUS "Doxygen not found, not building docs")
|
||||
endif()
|
||||
#find_package(Doxygen)
|
||||
#if(Doxygen_FOUND)
|
||||
# add_subdirectory(docs)
|
||||
#else()
|
||||
# message(STATUS "Doxygen not found, not building docs")
|
||||
#endif()
|
||||
endif()
|
||||
|
||||
# In source builds cause a lot of problems and unneccessary complexity
|
||||
function(prevent_in_source_builds)
|
||||
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "In-source builds are not allowed")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
prevent_in_source_builds()
|
||||
|
||||
# FetchContent added in CMake 3.11, downloads during the configure step
|
||||
# FetchContent_MakeAvailable was not added until CMake 3.14
|
||||
#include(FetchContent)
|
||||
@ -49,15 +58,17 @@ endif()
|
||||
#FetchContent_MakeAvailable(fmtlib)
|
||||
|
||||
# The compiled library code is here
|
||||
add_subdirectory(src)
|
||||
if( BTSTACK_PORT STREQUAL "libusb")
|
||||
add_subdirectory(port/libusb)
|
||||
elseif(BSTACK_PORT STREQUAL "zephy")
|
||||
add_subdirectory(port/zephyr)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(example)
|
||||
add_subdirectory(platform/posix)
|
||||
add_subdirectory(platform/libusb)
|
||||
add_subdirectory(platform/embedded)
|
||||
add_subdirectory(chipset/realtek)
|
||||
add_subdirectory(chipset/zephyr)
|
||||
add_subdirectory(3rd-party/rijndael)
|
||||
@ -67,6 +78,8 @@ add_subdirectory(3rd-party/bluedroid/decoder)
|
||||
add_subdirectory(3rd-party/bluedroid/encoder)
|
||||
add_subdirectory(3rd-party/tinydir)
|
||||
add_subdirectory(3rd-party/yxml)
|
||||
add_subdirectory(3rd-party/md5)
|
||||
add_subdirectory(3rd-party/hxcmod-player)
|
||||
|
||||
# Testing only available if this is the main app
|
||||
if(BUILD_TESTING)
|
||||
|
@ -1,3 +1,3 @@
|
||||
add_library( chipset_realtek btstack_chipset_realtek.c )
|
||||
target_include_directories( chipset_realtek PUBLIC . )
|
||||
target_link_libraries( chipset_realtek PRIVATE btstack )
|
||||
target_link_libraries( chipset_realtek PRIVATE btstack_core )
|
||||
|
@ -1,3 +1,3 @@
|
||||
add_library( chipset_zephyr STATIC btstack_chipset_zephyr.c )
|
||||
target_include_directories( chipset_zephyr PUBLIC . )
|
||||
target_link_libraries( chipset_zephyr PRIVATE btstack )
|
||||
target_link_libraries( chipset_zephyr PRIVATE btstack_core )
|
||||
|
@ -8,7 +8,7 @@ function(gatt_to_header out_var)
|
||||
string(REGEX REPLACE "\\.[^.]*$" ".h" out_f ${out_f})
|
||||
add_custom_command(OUTPUT ${out_f}
|
||||
COMMAND ${Python_EXECUTABLE}
|
||||
ARGS ${BTStackBase_SOURCE_DIR}/tool/compile_gatt.py ${in_f} ${out_f}
|
||||
ARGS ${BTstack_SOURCE_DIR}/tool/compile_gatt.py ${in_f} ${out_f}
|
||||
DEPENDS ${in_f}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Creating gatt header file ${out_f}"
|
||||
@ -19,11 +19,94 @@ function(gatt_to_header out_var)
|
||||
set(${out_var} "${result}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
file(GLOB GATT_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.gatt")
|
||||
|
||||
set( EXAMPLE_LIST
|
||||
a2dp_sink_demo.c
|
||||
a2dp_source_demo.c
|
||||
ancs_client_demo.c
|
||||
#ant_test.c
|
||||
att_delayed_response.c
|
||||
audio_duplex.c
|
||||
#avrcp_browsing_client.c
|
||||
dut_mode_classic.c
|
||||
gap_dedicated_bonding.c
|
||||
gap_inquiry.c
|
||||
gap_le_advertisements.c
|
||||
gap_link_keys.c
|
||||
gatt_battery_query.c
|
||||
gatt_browser.c
|
||||
gatt_counter.c
|
||||
gatt_device_information_query.c
|
||||
gatt_heart_rate_client.c
|
||||
gatt_streamer_server.c
|
||||
hfp_ag_demo.c
|
||||
hfp_hf_demo.c
|
||||
hid_host_demo.c
|
||||
hid_keyboard_demo.c
|
||||
hid_mouse_demo.c
|
||||
hog_boot_host_demo.c
|
||||
hog_host_demo.c
|
||||
hog_keyboard_demo.c
|
||||
hog_mouse_demo.c
|
||||
hsp_ag_demo.c
|
||||
hsp_hs_demo.c
|
||||
#le_audio_demo_util_sink.c
|
||||
#le_audio_demo_util_source.c
|
||||
le_credit_based_flow_control_mode_client.c
|
||||
le_credit_based_flow_control_mode_server.c
|
||||
le_mitm.c
|
||||
le_streamer_client.c
|
||||
led_counter.c
|
||||
mesh_node_demo.c
|
||||
mod_player.c
|
||||
nordic_spp_le_counter.c
|
||||
nordic_spp_le_streamer.c
|
||||
#pan_lwip_http_server.c
|
||||
panu_demo.c
|
||||
pbap_client_demo.c
|
||||
#sco_demo_util.c
|
||||
sdp_bnep_query.c
|
||||
sdp_general_query.c
|
||||
sdp_rfcomm_query.c
|
||||
sine_player.c
|
||||
sm_pairing_central.c
|
||||
sm_pairing_peripheral.c
|
||||
spp_and_gatt_counter.c
|
||||
spp_and_gatt_streamer.c
|
||||
spp_counter.c
|
||||
spp_flowcontrol.c
|
||||
spp_streamer.c
|
||||
spp_streamer_client.c
|
||||
ublox_spp_le_counter.c
|
||||
)
|
||||
|
||||
file(GLOB GATT_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.gatt")
|
||||
gatt_to_header( gatt_headers ${GATT_FILES} )
|
||||
|
||||
add_executable( gatt_counter gatt_counter.c gatt_counter.h )
|
||||
target_link_libraries( gatt_counter PRIVATE btstack )
|
||||
target_include_directories( gatt_counter PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# create targets
|
||||
foreach(EXAMPLE_FILE ${EXAMPLE_LIST})
|
||||
get_filename_component(EXAMPLE ${EXAMPLE_FILE} NAME_WE)
|
||||
|
||||
set( EXAMPLE_GATT_HEADER )
|
||||
if ( "${gatt_headers}" MATCHES "${EXAMPLE}\.h" )
|
||||
set( EXAMPLE_GATT_HEADER "${CMAKE_MATCH_0}" )
|
||||
endif()
|
||||
add_executable( ${EXAMPLE} ${EXAMPLE_FILE} ${EXAMPLE_GATT_HEADER})
|
||||
|
||||
target_link_options(${EXAMPLE} PRIVATE LINKER:
|
||||
$<$<OR:$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:AppleClang>>:
|
||||
-no_warn_duplicate_libraries>)
|
||||
|
||||
#target_link_libraries( ${EXAMPLE} PRIVATE btstack_core )
|
||||
#target_link_libraries( ${EXAMPLE} PRIVATE btstack_config )
|
||||
target_link_libraries( ${EXAMPLE} PRIVATE port )
|
||||
target_include_directories( ${EXAMPLE} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} )
|
||||
endforeach(EXAMPLE_FILE)
|
||||
|
||||
|
||||
target_link_libraries( a2dp_source_demo PRIVATE hxcmod-player )
|
||||
target_link_libraries( mod_player PRIVATE hxcmod-player )
|
||||
target_sources( hfp_ag_demo PRIVATE sco_demo_util.c )
|
||||
target_sources( hfp_hf_demo PRIVATE sco_demo_util.c )
|
||||
target_sources( hsp_ag_demo PRIVATE sco_demo_util.c )
|
||||
target_sources( hsp_hs_demo PRIVATE sco_demo_util.c )
|
||||
|
@ -1,20 +1,19 @@
|
||||
# Note that headers are optional, and do not affect add_library, but they will
|
||||
# not show up in IDEs unless they are listed in add_library.
|
||||
|
||||
file(GLOB HEADER_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||
file(GLOB SOURCE_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
|
||||
#set(HEADER_LIST "${ModernCMakeExample_SOURCE_DIR}/include/modern/lib.hpp")
|
||||
|
||||
# Make an automatic library - will be static or dynamic based on user setting
|
||||
add_library(gatt_service ${SOURCE_LIST} ${HEADER_LIST})
|
||||
target_include_directories( gatt_service PUBLIC . )
|
||||
target_link_libraries( gatt_service PRIVATE btstack )
|
||||
add_library(platform_embedded ${SOURCE_LIST} ${HEADER_LIST})
|
||||
|
||||
target_include_directories(platform_embedded PUBLIC .)
|
||||
|
||||
target_link_libraries(platform_embedded PRIVATE btstack_config)
|
||||
target_link_libraries(platform_embedded PRIVATE btstack_core)
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}/"
|
||||
PREFIX "GATT services Header Files"
|
||||
PREFIX "Platform embedded Header Files"
|
||||
FILES ${HEADER_LIST})
|
||||
|
@ -5,7 +5,6 @@ file(GLOB HEADER_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||
file(GLOB SOURCE_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
|
||||
#set(HEADER_LIST "${CMAKE_CURRENT_SOURCE_DIR}/include/modern/lib.hpp")
|
||||
|
||||
# Make an automatic library - will be static or dynamic based on user setting
|
||||
add_library(platform_libusb ${SOURCE_LIST} ${HEADER_LIST})
|
||||
@ -20,7 +19,10 @@ pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
||||
target_include_directories(platform_libusb PRIVATE ${LIBUSB_INCLUDE_DIRS})
|
||||
target_link_directories(platform_libusb PRIVATE ${LIBUSB_LIBRARY_DIRS})
|
||||
target_link_libraries(platform_libusb PRIVATE ${LIBUSB_LIBRARIES})
|
||||
target_link_libraries(platform_libusb PRIVATE btstack)
|
||||
|
||||
target_link_libraries(platform_libusb PRIVATE btstack_config)
|
||||
target_link_libraries(platform_libusb PRIVATE btstack_core)
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}/"
|
||||
|
@ -1,20 +1,41 @@
|
||||
# Note that headers are optional, and do not affect add_library, but they will
|
||||
# not show up in IDEs unless they are listed in add_library.
|
||||
set( SOURCE_LIST
|
||||
btstack_audio_portaudio.c
|
||||
btstack_link_key_db_fs.c
|
||||
btstack_network_posix.c
|
||||
btstack_run_loop_posix.c
|
||||
btstack_sco_transport_posix_i2s_test_bridge.c
|
||||
btstack_signal.c
|
||||
btstack_stdin_posix.c
|
||||
btstack_tlv_posix.c
|
||||
btstack_uart_posix.c
|
||||
hci_dump_posix_fs.c
|
||||
hci_dump_posix_stdout.c
|
||||
wav_util.c
|
||||
)
|
||||
set( HEADER_LIST
|
||||
btstack_link_key_db_fs.h
|
||||
btstack_run_loop_posix.h
|
||||
btstack_sco_transport_posix_i2s_test_bridge.h
|
||||
btstack_signal.h
|
||||
btstack_tlv_posix.h
|
||||
hci_dump_posix_fs.h
|
||||
hci_dump_posix_stdout.h
|
||||
wav_util.h
|
||||
)
|
||||
|
||||
file(GLOB HEADER_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||
file(GLOB SOURCE_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
|
||||
#set(HEADER_LIST "${CMAKE_CURRENT_SOURCE_DIR}/include/modern/lib.hpp")
|
||||
add_library(le_device_db_fs le_device_db_fs.c le_device_db_fs.h)
|
||||
target_include_directories(le_device_db_fs PUBLIC .)
|
||||
target_link_libraries(le_device_db_fs PRIVATE btstack_core)
|
||||
|
||||
# Make an automatic library - will be static or dynamic based on user setting
|
||||
add_library(platform_posix ${SOURCE_LIST} ${HEADER_LIST})
|
||||
|
||||
# We need this directory, and users of our library will need it too
|
||||
target_include_directories(platform_posix PUBLIC ./)
|
||||
target_include_directories(platform_posix PUBLIC .)
|
||||
|
||||
target_link_libraries(platform_posix PRIVATE btstack)
|
||||
target_link_libraries(platform_posix PRIVATE port)
|
||||
target_link_libraries(platform_posix PRIVATE btstack_core)
|
||||
target_link_libraries(platform_posix PRIVATE btstack_config)
|
||||
target_link_libraries(platform_posix PRIVATE tinydir)
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
@ -22,3 +43,4 @@ source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}/"
|
||||
PREFIX "Platform Header Files"
|
||||
FILES ${HEADER_LIST})
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
# Note that headers are optional, and do not affect add_library, but they will
|
||||
# not show up in IDEs unless they are listed in add_library.
|
||||
|
||||
file(GLOB HEADER_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||
#set(HEADER_LIST "${ModernCMakeExample_SOURCE_DIR}/include/modern/lib.hpp")
|
||||
#file(GLOB HEADER_LIST
|
||||
# CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||
|
||||
# Make an automatic library - will be static or dynamic based on user setting
|
||||
add_library(port main.c ${HEADER_LIST})
|
||||
add_library(btstack_config INTERFACE)
|
||||
target_include_directories(btstack_config INTERFACE .)
|
||||
|
||||
# We need this directory, and users of our library will need it too
|
||||
target_include_directories(port PUBLIC ./)
|
||||
|
||||
# This depends on (header only) boost
|
||||
target_link_libraries( port PRIVATE platform_posix )
|
||||
target_link_libraries( port PRIVATE platform_libusb )
|
||||
target_link_libraries( port PRIVATE btstack )
|
||||
target_link_libraries( port PRIVATE chipset_realtek )
|
||||
target_link_libraries( port PRIVATE chipset_zephyr )
|
||||
add_library(port main.c)
|
||||
target_include_directories(port PRIVATE .)
|
||||
target_link_libraries(port PRIVATE le_device_db_tlv)
|
||||
target_link_libraries(port PUBLIC btstack_config)
|
||||
target_link_libraries(port PUBLIC platform_posix)
|
||||
target_link_libraries(port PRIVATE platform_libusb)
|
||||
target_link_libraries(port PUBLIC platform_embedded)
|
||||
target_link_libraries(port PUBLIC btstack_core)
|
||||
target_link_libraries(port PRIVATE chipset_realtek)
|
||||
target_link_libraries(port PRIVATE chipset_zephyr)
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
source_group(
|
||||
|
@ -68,6 +68,7 @@
|
||||
#include "btstack_stdin.h"
|
||||
#include "btstack_tlv_posix.h"
|
||||
#include "classic/btstack_link_key_db_tlv.h"
|
||||
#include "hal_led.h"
|
||||
#include "hci.h"
|
||||
#include "hci_dump.h"
|
||||
#include "hci_dump_posix_fs.h"
|
||||
|
@ -2,15 +2,14 @@
|
||||
# not show up in IDEs unless they are listed in add_library.
|
||||
|
||||
file(GLOB HEADER_LIST
|
||||
CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.h")
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||
file(GLOB SOURCE_LIST
|
||||
CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.c")
|
||||
#set(HEADER_LIST "${ModernCMakeExample_SOURCE_DIR}/include/modern/lib.hpp")
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
|
||||
|
||||
# Make an automatic library - will be static or dynamic based on user setting
|
||||
add_library(btstack ${SOURCE_LIST} ${HEADER_LIST})
|
||||
add_library(btstack_core ${SOURCE_LIST} ${HEADER_LIST})
|
||||
|
||||
target_compile_options(btstack PRIVATE
|
||||
target_compile_options(btstack_core PRIVATE
|
||||
$<$<OR:$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:AppleClang>>:
|
||||
-Wunused-variable -Wswitch-default -Werror>
|
||||
$<$<C_COMPILER_ID:GNU>:
|
||||
@ -18,24 +17,25 @@ target_compile_options(btstack PRIVATE
|
||||
$<$<C_COMPILER_ID:MSVC>:
|
||||
/WX /W4>)
|
||||
|
||||
target_link_libraries( btstack PUBLIC port )
|
||||
target_link_libraries( btstack PRIVATE rijndael )
|
||||
target_link_libraries( btstack PRIVATE uecc )
|
||||
target_link_libraries( btstack PRIVATE lc3-google )
|
||||
target_link_libraries( btstack PUBLIC ble )
|
||||
target_link_libraries( btstack PUBLIC gatt_service )
|
||||
target_link_libraries( btstack PUBLIC classic )
|
||||
target_link_libraries( btstack_core PRIVATE btstack_config )
|
||||
target_link_libraries( btstack_core PRIVATE rijndael )
|
||||
target_link_libraries( btstack_core PRIVATE uecc )
|
||||
target_link_libraries( btstack_core PRIVATE lc3-google )
|
||||
target_link_libraries( btstack_core PUBLIC ble )
|
||||
target_link_libraries( btstack_core PUBLIC mesh )
|
||||
target_link_libraries( btstack_core PUBLIC classic )
|
||||
|
||||
# We need this directory, and users of our library will need it too
|
||||
target_include_directories( btstack PUBLIC . )
|
||||
target_include_directories( btstack_core PUBLIC . )
|
||||
target_compile_features( btstack_core PRIVATE c_std_99 )
|
||||
|
||||
add_subdirectory( ble )
|
||||
add_subdirectory( classic )
|
||||
|
||||
target_compile_features( btstack PRIVATE c_std_99 )
|
||||
add_subdirectory( mesh )
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
source_group(
|
||||
TREE "${PROJECT_SOURCE_DIR}/src"
|
||||
PREFIX "btstack Header Files"
|
||||
PREFIX "BTstack Core Header Files"
|
||||
FILES ${HEADER_LIST})
|
||||
|
||||
|
@ -1,19 +1,70 @@
|
||||
# Note that headers are optional, and do not affect add_library, but they will
|
||||
# not show up in IDEs unless they are listed in add_library.
|
||||
set( SOURCE_LIST
|
||||
att_db.c
|
||||
att_db_util.c
|
||||
att_dispatch.c
|
||||
att_server.c
|
||||
gatt-service/ancs_client.c
|
||||
gatt-service/battery_service_client.c
|
||||
gatt-service/battery_service_server.c
|
||||
gatt-service/bond_management_service_server.c
|
||||
gatt-service/cycling_power_service_server.c
|
||||
gatt-service/cycling_speed_and_cadence_service_server.c
|
||||
gatt-service/device_information_service_client.c
|
||||
gatt-service/device_information_service_server.c
|
||||
gatt-service/heart_rate_service_server.c
|
||||
gatt-service/hids_client.c
|
||||
gatt-service/hids_device.c
|
||||
gatt-service/nordic_spp_service_server.c
|
||||
gatt-service/scan_parameters_service_client.c
|
||||
gatt-service/scan_parameters_service_server.c
|
||||
gatt-service/tx_power_service_server.c
|
||||
gatt-service/ublox_spp_service_server.c
|
||||
gatt_client.c
|
||||
sm.c
|
||||
)
|
||||
set( HEADER_LIST
|
||||
att_db.h
|
||||
att_db_util.h
|
||||
att_dispatch.h
|
||||
att_server.h
|
||||
core.h
|
||||
gatt-service/ancs_client.h
|
||||
gatt-service/battery_service_client.h
|
||||
gatt-service/battery_service_server.h
|
||||
gatt-service/bond_management_service_server.h
|
||||
gatt-service/cycling_power_service_server.h
|
||||
gatt-service/cycling_speed_and_cadence_service_server.h
|
||||
gatt-service/device_information_service_client.h
|
||||
gatt-service/device_information_service_server.h
|
||||
gatt-service/heart_rate_service_server.h
|
||||
gatt-service/hids_client.h
|
||||
gatt-service/hids_device.h
|
||||
gatt-service/nordic_spp_service_server.h
|
||||
gatt-service/scan_parameters_service_client.h
|
||||
gatt-service/scan_parameters_service_server.h
|
||||
gatt-service/tx_power_service_server.h
|
||||
gatt-service/ublox_spp_service_server.h
|
||||
gatt_client.h
|
||||
le_device_db.h
|
||||
sm.h
|
||||
)
|
||||
|
||||
file(GLOB HEADER_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||
file(GLOB SOURCE_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
|
||||
#set(HEADER_LIST "${ModernCMakeExample_SOURCE_DIR}/include/modern/lib.hpp")
|
||||
add_library(le_device_db_tlv le_device_db_tlv.c le_device_db_tlv.h)
|
||||
target_include_directories(le_device_db_tlv PUBLIC .)
|
||||
target_link_libraries(le_device_db_tlv PUBLIC ble)
|
||||
|
||||
add_subdirectory( gatt-service )
|
||||
add_library(le_device_db_memory le_device_db_memory.c)
|
||||
target_include_directories(le_device_db_memory PUBLIC .)
|
||||
target_link_libraries(le_device_db_memory PUBLIC ble)
|
||||
|
||||
# Make an automatic library - will be static or dynamic based on user setting
|
||||
add_library(ble ${SOURCE_LIST} ${HEADER_LIST})
|
||||
target_include_directories(ble PUBLIC .)
|
||||
target_link_libraries(ble PRIVATE btstack)
|
||||
target_link_libraries(ble PUBLIC gatt_service)
|
||||
target_include_directories(ble PUBLIC gatt-service)
|
||||
|
||||
target_link_libraries(ble PUBLIC btstack_config)
|
||||
target_link_libraries(ble PUBLIC btstack_core)
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
source_group(
|
||||
@ -21,3 +72,5 @@ source_group(
|
||||
PREFIX "Bluetooth LE Header Files"
|
||||
FILES ${HEADER_LIST})
|
||||
|
||||
|
||||
|
||||
|
@ -5,15 +5,16 @@ file(GLOB HEADER_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||
file(GLOB SOURCE_LIST
|
||||
CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
|
||||
#set(HEADER_LIST "${ModernCMakeExample_SOURCE_DIR}/include/modern/lib.hpp")
|
||||
|
||||
# Make an automatic library - will be static or dynamic based on user setting
|
||||
add_library(classic ${SOURCE_LIST} ${HEADER_LIST})
|
||||
target_include_directories(classic PUBLIC .)
|
||||
target_link_libraries(classic PRIVATE btstack)
|
||||
target_include_directories(classic INTERFACE .)
|
||||
target_link_libraries(classic PRIVATE btstack_config)
|
||||
target_link_libraries(classic PRIVATE btstack_core)
|
||||
target_link_libraries(classic PRIVATE bluedroid_decoder)
|
||||
target_link_libraries(classic PRIVATE bluedroid_encoder)
|
||||
target_link_libraries(classic PRIVATE yxml)
|
||||
target_link_libraries(classic PRIVATE md5)
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
source_group(
|
||||
|
83
src/mesh/CMakeLists.txt
Normal file
83
src/mesh/CMakeLists.txt
Normal file
@ -0,0 +1,83 @@
|
||||
# Note that headers are optional, and do not affect add_library, but they will
|
||||
# not show up in IDEs unless they are listed in add_library.
|
||||
set( SOURCE_LIST
|
||||
adv_bearer.c
|
||||
beacon.c
|
||||
gatt-service/mesh_provisioning_service_server.c
|
||||
gatt-service/mesh_proxy_service_server.c
|
||||
gatt_bearer.c
|
||||
mesh.c
|
||||
mesh_access.c
|
||||
mesh_configuration_client.c
|
||||
mesh_configuration_server.c
|
||||
mesh_crypto.c
|
||||
mesh_foundation.c
|
||||
mesh_generic_default_transition_time_client.c
|
||||
mesh_generic_default_transition_time_server.c
|
||||
mesh_generic_level_client.c
|
||||
mesh_generic_level_server.c
|
||||
mesh_generic_on_off_client.c
|
||||
mesh_generic_on_off_server.c
|
||||
mesh_health_server.c
|
||||
mesh_iv_index_seq_number.c
|
||||
mesh_keys.c
|
||||
mesh_lower_transport.c
|
||||
mesh_network.c
|
||||
mesh_node.c
|
||||
mesh_peer.c
|
||||
mesh_proxy.c
|
||||
mesh_upper_transport.c
|
||||
mesh_virtual_addresses.c
|
||||
pb_adv.c
|
||||
pb_gatt.c
|
||||
provisioning.c
|
||||
provisioning_device.c
|
||||
provisioning_provisioner.c
|
||||
)
|
||||
set( HEADER_LIST
|
||||
adv_bearer.h
|
||||
beacon.h
|
||||
gatt-service/mesh_provisioning_service_server.h
|
||||
gatt-service/mesh_proxy_service_server.h
|
||||
gatt_bearer.h
|
||||
mesh.h
|
||||
mesh_access.h
|
||||
mesh_configuration_client.h
|
||||
mesh_configuration_server.h
|
||||
mesh_crypto.h
|
||||
mesh_foundation.h
|
||||
mesh_generic_default_transition_time_client.h
|
||||
mesh_generic_default_transition_time_server.h
|
||||
mesh_generic_level_client.h
|
||||
mesh_generic_level_server.h
|
||||
mesh_generic_model.h
|
||||
mesh_generic_on_off_client.h
|
||||
mesh_generic_on_off_server.h
|
||||
mesh_health_server.h
|
||||
mesh_iv_index_seq_number.h
|
||||
mesh_keys.h
|
||||
mesh_lower_transport.h
|
||||
mesh_network.h
|
||||
mesh_node.h
|
||||
mesh_peer.h
|
||||
mesh_proxy.h
|
||||
mesh_upper_transport.h
|
||||
mesh_virtual_addresses.h
|
||||
pb_adv.h
|
||||
pb_gatt.h
|
||||
provisioning.h
|
||||
provisioning_device.h
|
||||
provisioning_provisioner.h
|
||||
)
|
||||
add_library(mesh ${SOURCE_LIST} ${HEADER_LIST})
|
||||
target_include_directories( mesh PUBLIC . )
|
||||
target_link_libraries( mesh PRIVATE btstack_config )
|
||||
target_link_libraries( mesh PRIVATE btstack_core )
|
||||
|
||||
# IDEs should put the headers in a nice place
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}/"
|
||||
PREFIX "Mesh Header Files"
|
||||
FILES ${HEADER_LIST})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user