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

Fix CMakeLists so Platformio works properly again

This commit is contained in:
Hendrik Sauer 2021-06-22 16:14:13 +02:00 committed by Patrick Rathje
parent 5c47dbb2e0
commit ca90702af6
2 changed files with 18 additions and 13 deletions

View File

@ -2,17 +2,22 @@ cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(test)
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)
if(DEFINED NATIVE_POSIX)
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*)
else()
FILE(GLOB app_sources ../src/*.c*)
endif()
FILE(GLOB app_sources ../src/*.c* ${exposure-notification_SOURCE_DIR}/src/*.c*)
target_sources(app PRIVATE ${app_sources})

View File

@ -1,5 +1,5 @@
#!/bin/bash
rm -rf build
west build -b native_posix_64 . -- -DCMAKE_C_FLAGS="-DNATIVE_POSIX -I../../include/tls_config -DDISPLAY"
west build -b native_posix_64 . -- -DCMAKE_C_FLAGS="-DNATIVE_POSIX -I../../include/tls_config -DDISPLAY" -DNATIVE_POSIX=1
echo "Run ./build/zephyr/zephyr.elf"