diff --git a/src/CMake/components.cmake b/src/CMake/components.cmake index 248d78da911..3ceb1be8e2b 100644 --- a/src/CMake/components.cmake +++ b/src/CMake/components.cmake @@ -54,11 +54,10 @@ if (XRT_BASE) set (XRT_DEV_COMPONENT ${XRT_BASE_DEV_COMPONENT}) endif(XRT_BASE) -# NPU builds the one NPU package for both deployment and development -# for everything enabled by XRT_NPU. This will change into base and -# npu separated packages along with packages for development and -# deployment +# NPU builds one NPU package for both deployment and development +# for everything enabled by XRT_NPU and XRT_BASE if (XRT_NPU) + set (XRT_BASE 1) set (XRT_BASE_COMPONENT "npu") set (XRT_BASE_DEV_COMPONENT "npu") set (XRT_NPU_COMPONENT "npu") @@ -71,15 +70,34 @@ if (XRT_NPU) set (XRT_DEV_COMPONENT ${XRT_NPU_DEV_COMPONENT}) endif(XRT_NPU) +# Alveo builds one Alveo package for both deployment and development +# for everything enabled by XRT_ALVEO and XRT_BASE +if (XRT_ALVEO) + set (XRT_BASE 1) + + set (XRT_BASE_COMPONENT "alveo") + set (XRT_BASE_DEV_COMPONENT "alveo") + set (XRT_ALVEO_COMPONENT "alveo") + set (XRT_ALVEO_DEV_COMPONENT "alveo") + + # For the time being, dump everything into alveo that has not + # been explicitly marked alveo or npu + set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "alveo") + set (XRT_COMPONENT ${XRT_ALVEO_COMPONENT}) + set (XRT_DEV_COMPONENT ${XRT_ALVEO_DEV_COMPONENT}) +endif(XRT_ALVEO) + # Legacy, build one XRT package for both deployment and development -# This build is for alveo +# Include everything enabled by XRT_BASE and XRT_ALVEO if (XRT_XRT) - set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "xrt") + set (XRT_BASE 1) + set (XRT_ALVEO 1) + set (XRT_NPU 0) + set (XRT_BASE_COMPONENT "xrt") set (XRT_BASE_DEV_COMPONENT "xrt") set (XRT_ALVEO_COMPONENT "xrt") set (XRT_ALVEO_DEV_COMPONENT "xrt") - set (XRT_ALVEO 1) - set (XRT_NPU 0) + set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "xrt") endif(XRT_XRT) diff --git a/src/CMake/embedded_system.cmake b/src/CMake/embedded_system.cmake index b15f47c23ae..18fe3360111 100644 --- a/src/CMake/embedded_system.cmake +++ b/src/CMake/embedded_system.cmake @@ -41,8 +41,10 @@ endif(GIT_FOUND) set(LINUX_FLAVOR ${CMAKE_SYSTEM_NAME}) set(LINUX_KERNEL_VERSION ${CMAKE_SYSTEM_VERSION}) -# --- Set up what components of XRT to build --- +# Set up what components of XRT to build +# Indicate that we are building for edge include(CMake/components.cmake) +set(XRT_EDGE 1) # --- Boost Libraries --- include (CMake/boostUtil.cmake) diff --git a/src/runtime_src/core/common/CMakeLists.txt b/src/runtime_src/core/common/CMakeLists.txt index 04e06309680..7a99f639d03 100644 --- a/src/runtime_src/core/common/CMakeLists.txt +++ b/src/runtime_src/core/common/CMakeLists.txt @@ -1,6 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (C) 2019-2022 Xilinx, Inc. All rights reserved. -# Copyright (C) 2022-2024 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (C) 2022-2025 Advanced Micro Devices, Inc. All rights reserved. +if (NOT XRT_BASE) + return() +endif() + add_subdirectory(api) add_subdirectory(xdp) add_subdirectory(runner) diff --git a/src/runtime_src/core/include/CMakeLists.txt b/src/runtime_src/core/include/CMakeLists.txt index 5cc5e23438f..6d052661a15 100644 --- a/src/runtime_src/core/include/CMakeLists.txt +++ b/src/runtime_src/core/include/CMakeLists.txt @@ -22,7 +22,7 @@ set(XRT_CORE_HEADER_SRC # Legacy deprecated install install (FILES ${XRT_CORE_HEADER_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR} - COMPONENT ${XRT_DEV_COMPONENT}) + COMPONENT ${XRT_BASE_DEV_COMPONENT}) # Legacy experimental add_subdirectory(experimental) diff --git a/src/runtime_src/core/include/experimental/CMakeLists.txt b/src/runtime_src/core/include/experimental/CMakeLists.txt index 8560f27b1f7..152a0f50459 100644 --- a/src/runtime_src/core/include/experimental/CMakeLists.txt +++ b/src/runtime_src/core/include/experimental/CMakeLists.txt @@ -31,4 +31,4 @@ set(XRT_EXPERIMENTAL_HEADER_SRC # Legacy deprecated install install (FILES ${XRT_EXPERIMENTAL_HEADER_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/experimental - COMPONENT ${XRT_DEV_COMPONENT}) + COMPONENT ${XRT_BASE_DEV_COMPONENT}) diff --git a/src/runtime_src/core/include/xrt/detail/CMakeLists.txt b/src/runtime_src/core/include/xrt/detail/CMakeLists.txt index 1490ee68e23..5b1a83d5d77 100644 --- a/src/runtime_src/core/include/xrt/detail/CMakeLists.txt +++ b/src/runtime_src/core/include/xrt/detail/CMakeLists.txt @@ -8,11 +8,6 @@ set(XRT_XRT_DETAIL_HEADER_SRC param_traits.h pimpl.h) -# base component install -install (FILES ${XRT_XRT_DETAIL_HEADER_SRC} - DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail - COMPONENT ${XRT_BASE_DEV_COMPONENT}) - set(XRT_XRT_DETAIL_LEGACY_SRC ert.h xclbin.h @@ -20,7 +15,7 @@ set(XRT_XRT_DETAIL_LEGACY_SRC xrt_mem.h) # base component install -install (FILES ${XRT_XRT_DETAIL_LEGACY_SRC} +install (FILES ${XRT_XRT_DETAIL_HEADER_SRC} ${XRT_XRT_DETAIL_LEGACY_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail COMPONENT ${XRT_BASE_DEV_COMPONENT}) diff --git a/src/runtime_src/core/include/xrt/detail/windows/CMakeLists.txt b/src/runtime_src/core/include/xrt/detail/windows/CMakeLists.txt index 7f0fae1fab9..54e083041f4 100644 --- a/src/runtime_src/core/include/xrt/detail/windows/CMakeLists.txt +++ b/src/runtime_src/core/include/xrt/detail/windows/CMakeLists.txt @@ -8,15 +8,10 @@ set(XRT_WINDOWS_HEADER_SRC types.h uuid.h) -# xrt component deprecated install +# Legacy deprecated install install (FILES ${XRT_WINDOWS_HEADER_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/windows - COMPONENT ${XRT_DEV_COMPONENT}) - -# xrt component install -install (FILES ${XRT_WINDOWS_HEADER_SRC} - DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail/windows - COMPONENT ${XRT_DEV_COMPONENT}) + COMPONENT ${XRT_BASE_DEV_COMPONENT}) # base component install install (FILES ${XRT_WINDOWS_HEADER_SRC} diff --git a/src/runtime_src/xdp/CMakeLists.txt b/src/runtime_src/xdp/CMakeLists.txt index f42e4c58e72..55003225873 100644 --- a/src/runtime_src/xdp/CMakeLists.txt +++ b/src/runtime_src/xdp/CMakeLists.txt @@ -37,7 +37,7 @@ if (XRT_NPU) add_compile_options("-DSKIP_IOCTL") add_subdirectory(profile) -elseif(XRT_ALVEO) +elseif(XRT_ALVEO OR XRT_EDGE) add_subdirectory(appdebug) add_subdirectory(debug)