1
0
mirror of https://github.com/CovidBraceletPrj/CovidBracelet.git synced 2024-12-05 00:55:43 +01:00

Improve native build

This commit is contained in:
Hendrik Sauer 2021-06-17 11:30:57 +02:00 committed by Patrick Rathje
parent 62f31a3282
commit 7a7914c7a9
2 changed files with 13 additions and 3 deletions

View File

@ -2,5 +2,17 @@ cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(test)
FILE(GLOB app_sources ../src/*.c*)
include(FetchContent)
FetchContent_Declare(
exposure-notification
GIT_REPOSITORY https://github.com/prathje/exposure-notification
GIT_TAG origin/main
)
FetchContent_GetProperties(exposure-notification)
if (NOT exposure-notification_POPULATED)
FetchContent_Populate(exposure-notification)
endif ()
target_include_directories(app PUBLIC ${exposure-notification_SOURCE_DIR}/include)
FILE(GLOB app_sources ../src/*.c* ${exposure-notification_SOURCE_DIR}/src/*.c*)
target_sources(app PRIVATE ${app_sources})

View File

@ -1,7 +1,5 @@
#!/bin/bash
rm -rf build
cp ../.pio/libdeps/nrf52840_dk/exposure-notification/*/exposure-notification.* ../src
west build -b native_posix_64 . -- -DCMAKE_C_FLAGS="-DNATIVE_POSIX -I../../include/tls_config -DDISPLAY"
rm ../src/exposure-notification.c ../src/exposure-notification.h
echo "Run ./build/zephyr/zephyr.elf --bt-dev=hci0"