Skip to content

Commit

Permalink
lib: xlnx: Update logic to pull in vendor-specific logic based on PRO…
Browse files Browse the repository at this point in the history
…JECT_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 <ben.levinsky@amd.com>
  • Loading branch information
bentheredonethat committed Aug 8, 2024
1 parent 3aee6be commit 019c69c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
14 changes: 4 additions & 10 deletions lib/system/freertos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
12 changes: 3 additions & 9 deletions lib/system/generic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 019c69c

Please sign in to comment.