From 019c69cb66dcba69cf6b0722428275a63a137e59 Mon Sep 17 00:00:00 2001 From: Ben Levinsky Date: Tue, 16 Jul 2024 15:08:52 -0700 Subject: [PATCH] lib: xlnx: Update logic to pull in vendor-specific logic based on PROJECT_VENDOR Simplify logic that coordinates when to pull in Xilinx-AMD BSP and setup code basedd on new CMake variable 'PROJECT_VENDOR'. Signed-off-by: Ben Levinsky --- lib/system/freertos/CMakeLists.txt | 14 ++++---------- lib/system/generic/CMakeLists.txt | 12 +++--------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/lib/system/freertos/CMakeLists.txt b/lib/system/freertos/CMakeLists.txt index c4f56a46..89823245 100644 --- a/lib/system/freertos/CMakeLists.txt +++ b/lib/system/freertos/CMakeLists.txt @@ -17,14 +17,8 @@ collect (PROJECT_LIB_SOURCES irq.c) collect (PROJECT_LIB_SOURCES shmem.c) collect (PROJECT_LIB_SOURCES time.c) -if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_MACHINE}) +if ("${PROJECT_VENDOR}" STREQUAL "xlnx") + add_subdirectory(xlnx) +elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_MACHINE}) add_subdirectory(${PROJECT_MACHINE}) -endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_MACHINE}) - -if ("${PROJECT_MACHINE}" STREQUAL "zynqmp_a53" OR - "${PROJECT_MACHINE}" STREQUAL "zynqmp_a72" OR - "${PROJECT_MACHINE}" STREQUAL "zynqmp_a78" OR - "${PROJECT_MACHINE}" STREQUAL "zynqmp_r5" OR - "${PROJECT_MACHINE}" STREQUAL "zynq7") -add_subdirectory(xlnx) -endif() +endif("${PROJECT_VENDOR}" STREQUAL "xlnx") diff --git a/lib/system/generic/CMakeLists.txt b/lib/system/generic/CMakeLists.txt index 9427635b..89823245 100644 --- a/lib/system/generic/CMakeLists.txt +++ b/lib/system/generic/CMakeLists.txt @@ -17,14 +17,8 @@ collect (PROJECT_LIB_SOURCES irq.c) collect (PROJECT_LIB_SOURCES shmem.c) collect (PROJECT_LIB_SOURCES time.c) -if ("${PROJECT_MACHINE}" STREQUAL "zynqmp_a53" OR - "${PROJECT_MACHINE}" STREQUAL "zynqmp_a72" OR - "${PROJECT_MACHINE}" STREQUAL "zynqmp_a78" OR - "${PROJECT_MACHINE}" STREQUAL "zynqmp_r5" OR - "${PROJECT_MACHINE}" STREQUAL "microblaze_generic" OR - "${PROJECT_MACHINE}" STREQUAL "zynq7") - add_subdirectory(xlnx) +if ("${PROJECT_VENDOR}" STREQUAL "xlnx") + add_subdirectory(xlnx) elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_MACHINE}) add_subdirectory(${PROJECT_MACHINE}) -endif() - +endif("${PROJECT_VENDOR}" STREQUAL "xlnx")