1# SPDX-License-Identifier: Apache-2.0
2
3cmake_minimum_required(VERSION 3.20.0)
4
5find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
6
7project(conn)
8
9include_directories(BEFORE
10    ${ZEPHYR_BASE}/tests/bluetooth/host/conn
11    ${ZEPHYR_BASE}/tests/bluetooth/host/conn/mocks/zephyr/include
12)
13
14add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host host_mocks)
15add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/conn/mocks mocks)
16
17target_link_libraries(testbinary PRIVATE mocks host_mocks)
18
19target_include_directories(mocks PUBLIC
20  ${ZEPHYR_BASE}/subsys/bluetooth/host
21)
22
23target_sources(testbinary
24    PRIVATE
25    src/main.c
26
27    ${ZEPHYR_BASE}/subsys/bluetooth/host/conn.c
28    ${ZEPHYR_BASE}/subsys/logging/log_minimal.c
29    ${ZEPHYR_BASE}/lib/net_buf/buf.c
30    ${ZEPHYR_BASE}/lib/net_buf/buf_simple.c
31)
32