btstack/test/gap/CMakeLists.txt

48 lines
1.2 KiB
CMake
Raw Normal View History

2023-01-03 23:04:26 +00:00
cmake_minimum_required (VERSION 3.5)
project(test-gap)
# find pkgconfig
find_package(PkgConfig REQUIRED)
# add CppUTest
include_directories("/usr/local/include")
link_directories("/usr/local/lib")
link_libraries( CppUTest )
link_libraries( CppUTestExt )
include_directories(.)
include_directories(../../src)
include_directories(../../platform/posix)
include_directories( ${CMAKE_CURRENT_BINARY_DIR})
add_definitions(-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
set(SOURCES
../../src/ad_parser.c
../../src/ble/att_db.c
../../src/ble/att_dispatch.c
../../src/ble/gatt_client.c
../../src/ble/le_device_db_memory.c
../../src/btstack_linked_list.c
../../src/btstack_run_loop.c
../../src/btstack_memory.c
../../src/btstack_memory_pool.c
../../src/btstack_util.c
../../src/hci.c
../../src/hci_cmd.c
../../src/hci_dump.c
2023-05-25 15:28:53 +00:00
../../platform/posix/btstack_run_loop_posix.c
2023-01-03 23:04:26 +00:00
../../platform/posix/hci_dump_posix_fs.c
)
# create static lib
add_library(btstack STATIC ${SOURCES})
# create targets
foreach(EXAMPLE_FILE test_le_scan.cpp hci_test.cpp)
get_filename_component(EXAMPLE ${EXAMPLE_FILE} NAME_WE)
set (SOURCE_FILES ${EXAMPLE_FILE})
add_executable(${EXAMPLE} ${SOURCE_FILES} )
target_link_libraries(${EXAMPLE} btstack)
endforeach(EXAMPLE_FILE)