summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-01-22 22:31:08 +0700
committerhathach <[email protected]>2025-01-22 22:31:08 +0700
commit6080f89f3daae50344e21accf972061240f55ccd (patch)
tree0bd2e48e588877d9751daeddd3d4c71b21101f5e /examples
parent91214b46142186b6c30ea468779c7ad39e1bc605 (diff)
- change to use CMAKE_SYSTEM_CPU to prevent CMAKE_SYSTEM_PROCESSOR conflict with zephyr
- change tinyusb CMakeLists.txt to function tinyusb_target_add() instead of defining tinyusb lib target
Diffstat (limited to 'examples')
-rw-r--r--examples/build_system/cmake/toolchain/common.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/build_system/cmake/toolchain/common.cmake b/examples/build_system/cmake/toolchain/common.cmake
index ce97664d5..4c181137b 100644
--- a/examples/build_system/cmake/toolchain/common.cmake
+++ b/examples/build_system/cmake/toolchain/common.cmake
@@ -4,6 +4,7 @@ include(CMakePrintHelpers)
# Common
# ----------------------------------------------------------------------------
set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_CPU})
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
# Look for includes and libraries only in the target system prefix.
@@ -13,7 +14,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# pass TOOLCHAIN_CPU to
-set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_SYSTEM_CPU)
+set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_SYSTEM_PROCESSOR CMAKE_SYSTEM_CPU)
include(${CMAKE_CURRENT_LIST_DIR}/../cpu/${CMAKE_SYSTEM_CPU}.cmake)
# ----------------------------------------------------------------------------