From ca43d59f038e9c591ad09774acf98616908cf000 Mon Sep 17 00:00:00 2001 From: Samuel Berkun Date: Thu, 1 Feb 2024 12:17:10 -0800 Subject: [PATCH] add PLATFORM_RP2040 cmake variable --- core/CMakeLists.txt | 2 +- core/platform/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 08871e5d7..618619f57 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -93,7 +93,7 @@ endif() # Link with thread library, unless we are on the Zephyr platform. if(NOT DEFINED LF_SINGLE_THREADED OR DEFINED LF_TRACE) - if (NOT (PLATFORM_ZEPHYR OR ${CMAKE_SYSTEM_NAME} STREQUAL "Rp2040")) + if (NOT (PLATFORM_ZEPHYR OR PLATFORM_RP2040)) find_package(Threads REQUIRED) target_link_libraries(reactor-c PUBLIC Threads::Threads) endif() diff --git a/core/platform/CMakeLists.txt b/core/platform/CMakeLists.txt index 9937488a4..f046e34a7 100644 --- a/core/platform/CMakeLists.txt +++ b/core/platform/CMakeLists.txt @@ -24,6 +24,7 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Zephyr") set(PLATFORM_ZEPHYR true) elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Rp2040") list(APPEND CORE_COMPILE_DEFS PLATFORM_RP2040) + set(PLATFORM_RP2040 true) endif() # Prepend all sources with platform