Skip to content

Commit

Permalink
Fix error when build base component (Xilinx#8707)
Browse files Browse the repository at this point in the history
Amend Xilinx#8706. Use dummy value or XRT_DEV_COMPONENT when building only
base component.

Tempoary fix for cpackLin conditionally adding dependencies for
legacy XRT when XRT_DEV_COMPONENT equals "xrt".  We don't want the
dependencies in case of base package so use dummy value to by-pass.

Also, ensure that pcie/linux shim is built only when XRT_BASE is
active.  Linux shim is shared between npu and alveo, hence should be
in base component only.

Signed-off-by: Soren Soe <[email protected]>
  • Loading branch information
stsoe authored and rchane committed Jan 24, 2025
1 parent 195e78c commit 0a30171
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/CMake/components.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ if (XRT_BASE)
set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "base")
set (XRT_BASE_COMPONENT "base")
set (XRT_BASE_DEV_COMPONENT "base-${XRT_DEV_COMPONENT_SUFFIX}")

# Tempoary fix for cpackLin conditionally adding dependencies for
# legacy XRT when XRT_DEV_COMPONENT equals "xrt". We don't want the
# dependencies in case of base package.
set (XRT_DEV_COMPONENT "dummy")
endif(XRT_BASE)

# NPU builds one NPU package for both deployment and development
Expand Down
9 changes: 8 additions & 1 deletion src/runtime_src/core/pcie/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2019-2022 Xilinx, Inc. All rights reserved.
# Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
# Copyright (C) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.

# Linux shim is part of the base component. It is used by both
# Alveo and NPU components.
if (NOT XRT_BASE)
return()
endif()

add_subdirectory(plugin/xdp)

add_library(core_pcielinux_objects OBJECT
Expand Down

0 comments on commit 0a30171

Please sign in to comment.