btstack/test/auto-pts/CMakeLists.txt

83 lines
2.7 KiB
CMake
Raw Normal View History

2019-11-02 18:47:10 +01:00
cmake_minimum_required (VERSION 3.5)
project(BTstack)
# fink pkgconfig
find_package(PkgConfig REQUIRED)
# libusb
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
include_directories(${LIBUSB_INCLUDE_DIRS})
link_directories(${LIBUSB_LIBRARY_DIRS})
link_libraries(${LIBUSB_LIBRARIES})
2019-11-02 18:47:10 +01:00
# add all directories
include_directories(../../3rd-party/micro-ecc)
2020-08-31 14:10:47 +02:00
# include_directories(../../3rd-party/bluedroid/decoder/include)
# include_directories(../../3rd-party/bluedroid/encoder/include)
# include_directories(../../3rd-party/md5)
# include_directories(../../3rd-party/hxcmod-player)
# include_directories(../../3rd-party/hxcmod-player/mod)
# include_directories(../../3rd-party/yxml)
2021-01-29 14:56:13 +01:00
include_directories(../../3rd-party/rijndael)
2019-11-02 18:47:10 +01:00
include_directories(../../3rd-party/tinydir)
include_directories(../../chipset/zephyr)
include_directories(../../src)
include_directories(../../platform/posix)
include_directories(../../platform/embedded)
include_directories(../../platform/lwip)
include_directories(../../platform/lwip/port)
include_directories(.)
2019-11-02 18:47:10 +01:00
include_directories(..)
# find src files
file(GLOB SOURCES_SRC "../../src/*.c" "../../example/sco_demo_util.c")
file(GLOB SOURCES_BLE "../../src/ble/*.c")
file(GLOB SOURCES_GATT "../../src/ble/gatt-service/*.c")
2020-08-31 14:10:47 +02:00
# file(GLOB SOURCES_CLASSIC "../../src/classic/*.c")
# file(GLOB SOURCES_BLUEDROID "../../3rd-party/bluedroid/encoder/srce/*.c" "../../3rd-party/bluedroid/decoder/srce/*.c")
# file(GLOB SOURCES_MD5 "../../3rd-party/md5/md5.c")
2020-08-31 14:27:41 +02:00
file(GLOB SOURCES_UECC "../../3rd-party/micro-ecc/uECC.c")
2020-08-31 14:10:47 +02:00
# file(GLOB SOURCES_YXML "../../3rd-party/yxml/yxml.c")
# file(GLOB SOURCES_HXCMOD "../../3rd-party/hxcmod-player/*.c" "../../3rd-party/hxcmod-player/mods/*.c")
2019-11-02 18:47:10 +01:00
file(GLOB SOURCES_POSIX "../../platform/posix/*.c")
2020-08-31 14:10:47 +02:00
file(GLOB SOURCES_LIBUSB "../../platform/libusb/*.c")
2019-11-02 18:47:10 +01:00
file(GLOB SOURCES_ZEPHYR "../../chipset/zephyr/*.c")
# remove some
2019-11-04 16:28:33 +01:00
file(GLOB SOURCES_BLE_OFF "../../src/ble/le_device_db_memory.c")
list(REMOVE_ITEM SOURCES_BLE ${SOURCES_BLE_OFF})
file(GLOB SOURCES_POSIX_OFF "../../platform/posix/le_device_db_fs.c")
list(REMOVE_ITEM SOURCES_POSIX ${SOURCES_POSIX_OFF})
2019-11-02 18:47:10 +01:00
set(SOURCES
2020-08-31 14:10:47 +02:00
# ${SOURCES_MD5}
# ${SOURCES_YXML}
# ${SOURCES_BLUEDROID}
2019-11-02 18:47:10 +01:00
${SOURCES_POSIX}
${SOURCES_LIBUSB}
${SOURCES_SRC}
${SOURCES_BLE}
${SOURCES_GATT}
2020-08-31 14:10:47 +02:00
# ${SOURCES_CLASSIC}
2019-11-02 18:47:10 +01:00
${SOURCES_UECC}
2020-08-31 14:10:47 +02:00
# ${SOURCES_HXCMOD}
2019-11-02 18:47:10 +01:00
${SOURCES_ZEPHYR}
2021-01-29 14:56:13 +01:00
"../../3rd-party/rijndael/rijndael.c"
2019-11-02 18:47:10 +01:00
)
add_compile_options(--coverage)
add_link_options( --coverage)
add_definitions( -DCOVERAGE)
2019-11-02 18:47:10 +01:00
# create static lib
add_library(btstack STATIC ${SOURCES})
# target
set (EXAMPLE btpclient)
2019-11-02 18:47:10 +01:00
# create targets
2020-08-31 14:10:47 +02:00
set (SOURCE_FILES ${EXAMPLE}.c main.c btp_socket.c)
2019-11-02 18:47:10 +01:00
add_executable(${EXAMPLE} ${SOURCE_FILES} )
target_link_libraries(${EXAMPLE} btstack)