Fix CMakeLists so Platformio works properly again
This commit is contained in:
parent
5c47dbb2e0
commit
ca90702af6
|
@ -2,17 +2,22 @@ cmake_minimum_required(VERSION 3.13.1)
|
||||||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
|
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
|
||||||
project(test)
|
project(test)
|
||||||
|
|
||||||
include(FetchContent)
|
if(DEFINED NATIVE_POSIX)
|
||||||
FetchContent_Declare(
|
include(FetchContent)
|
||||||
exposure-notification
|
FetchContent_Declare(
|
||||||
GIT_REPOSITORY https://github.com/prathje/exposure-notification
|
exposure-notification
|
||||||
GIT_TAG origin/main
|
GIT_REPOSITORY https://github.com/prathje/exposure-notification
|
||||||
)
|
GIT_TAG origin/main
|
||||||
FetchContent_GetProperties(exposure-notification)
|
)
|
||||||
if (NOT exposure-notification_POPULATED)
|
FetchContent_GetProperties(exposure-notification)
|
||||||
FetchContent_Populate(exposure-notification)
|
if (NOT exposure-notification_POPULATED)
|
||||||
endif ()
|
FetchContent_Populate(exposure-notification)
|
||||||
target_include_directories(app PUBLIC ${exposure-notification_SOURCE_DIR}/include)
|
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})
|
target_sources(app PRIVATE ${app_sources})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
rm -rf build
|
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"
|
echo "Run ./build/zephyr/zephyr.elf"
|
Loading…
Reference in New Issue