Skip to content

Commit c19b80a

Browse files
authored
Update install component for exported headers (#8698)
* Hook up building of Alveo component Alveo builds one Alveo package for both deployment and development for everything enabled by XRT_ALVEO and XRT_BASE. Signed-off-by: Soren Soe <[email protected]> * Update install component for exported headers All exported headers should use XRT_BASE_DEV_COMPONENT. This symbolic component is controlled by XRT depending on what component is being built. Signed-off-by: Soren Soe <[email protected]> * Exclude rumtime_src/core/common unless XRT_BASE is being built XRT_BASE is currently defined when building npu, alveo, and base, so this change really is a no-op as of now. Signed-off-by: Soren Soe <[email protected]> * Indicate build is for edge by setting XRT_EDGE CMake variable Set XRT_EDGE for embedded builds. Use XRT_EDGE conditionally for clarity. Signed-off-by: Soren Soe <[email protected]> --------- Signed-off-by: Soren Soe <[email protected]>
1 parent e0b20f1 commit c19b80a

File tree

8 files changed

+40
-26
lines changed

8 files changed

+40
-26
lines changed

src/CMake/components.cmake

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ if (XRT_BASE)
5454
set (XRT_DEV_COMPONENT ${XRT_BASE_DEV_COMPONENT})
5555
endif(XRT_BASE)
5656

57-
# NPU builds the one NPU package for both deployment and development
58-
# for everything enabled by XRT_NPU. This will change into base and
59-
# npu separated packages along with packages for development and
60-
# deployment
57+
# NPU builds one NPU package for both deployment and development
58+
# for everything enabled by XRT_NPU and XRT_BASE
6159
if (XRT_NPU)
60+
set (XRT_BASE 1)
6261
set (XRT_BASE_COMPONENT "npu")
6362
set (XRT_BASE_DEV_COMPONENT "npu")
6463
set (XRT_NPU_COMPONENT "npu")
@@ -71,15 +70,34 @@ if (XRT_NPU)
7170
set (XRT_DEV_COMPONENT ${XRT_NPU_DEV_COMPONENT})
7271
endif(XRT_NPU)
7372

73+
# Alveo builds one Alveo package for both deployment and development
74+
# for everything enabled by XRT_ALVEO and XRT_BASE
75+
if (XRT_ALVEO)
76+
set (XRT_BASE 1)
77+
78+
set (XRT_BASE_COMPONENT "alveo")
79+
set (XRT_BASE_DEV_COMPONENT "alveo")
80+
set (XRT_ALVEO_COMPONENT "alveo")
81+
set (XRT_ALVEO_DEV_COMPONENT "alveo")
82+
83+
# For the time being, dump everything into alveo that has not
84+
# been explicitly marked alveo or npu
85+
set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "alveo")
86+
set (XRT_COMPONENT ${XRT_ALVEO_COMPONENT})
87+
set (XRT_DEV_COMPONENT ${XRT_ALVEO_DEV_COMPONENT})
88+
endif(XRT_ALVEO)
89+
7490
# Legacy, build one XRT package for both deployment and development
75-
# This build is for alveo
91+
# Include everything enabled by XRT_BASE and XRT_ALVEO
7692
if (XRT_XRT)
77-
set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "xrt")
93+
set (XRT_BASE 1)
94+
set (XRT_ALVEO 1)
95+
set (XRT_NPU 0)
96+
7897
set (XRT_BASE_COMPONENT "xrt")
7998
set (XRT_BASE_DEV_COMPONENT "xrt")
8099
set (XRT_ALVEO_COMPONENT "xrt")
81100
set (XRT_ALVEO_DEV_COMPONENT "xrt")
82-
set (XRT_ALVEO 1)
83-
set (XRT_NPU 0)
101+
set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "xrt")
84102
endif(XRT_XRT)
85103

src/CMake/embedded_system.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ endif(GIT_FOUND)
4141
set(LINUX_FLAVOR ${CMAKE_SYSTEM_NAME})
4242
set(LINUX_KERNEL_VERSION ${CMAKE_SYSTEM_VERSION})
4343

44-
# --- Set up what components of XRT to build ---
44+
# Set up what components of XRT to build
45+
# Indicate that we are building for edge
4546
include(CMake/components.cmake)
47+
set(XRT_EDGE 1)
4648

4749
# --- Boost Libraries ---
4850
include (CMake/boostUtil.cmake)

src/runtime_src/core/common/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# Copyright (C) 2019-2022 Xilinx, Inc. All rights reserved.
3-
# Copyright (C) 2022-2024 Advanced Micro Devices, Inc. All rights reserved.
3+
# Copyright (C) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.
4+
if (NOT XRT_BASE)
5+
return()
6+
endif()
7+
48
add_subdirectory(api)
59
add_subdirectory(xdp)
610
add_subdirectory(runner)

src/runtime_src/core/include/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set(XRT_CORE_HEADER_SRC
2222
# Legacy deprecated install
2323
install (FILES ${XRT_CORE_HEADER_SRC}
2424
DESTINATION ${XRT_INSTALL_INCLUDE_DIR}
25-
COMPONENT ${XRT_DEV_COMPONENT})
25+
COMPONENT ${XRT_BASE_DEV_COMPONENT})
2626

2727
# Legacy experimental
2828
add_subdirectory(experimental)

src/runtime_src/core/include/experimental/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ set(XRT_EXPERIMENTAL_HEADER_SRC
3131
# Legacy deprecated install
3232
install (FILES ${XRT_EXPERIMENTAL_HEADER_SRC}
3333
DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/experimental
34-
COMPONENT ${XRT_DEV_COMPONENT})
34+
COMPONENT ${XRT_BASE_DEV_COMPONENT})

src/runtime_src/core/include/xrt/detail/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,14 @@ set(XRT_XRT_DETAIL_HEADER_SRC
88
param_traits.h
99
pimpl.h)
1010

11-
# base component install
12-
install (FILES ${XRT_XRT_DETAIL_HEADER_SRC}
13-
DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail
14-
COMPONENT ${XRT_BASE_DEV_COMPONENT})
15-
1611
set(XRT_XRT_DETAIL_LEGACY_SRC
1712
ert.h
1813
xclbin.h
1914
xrt_error_code.h
2015
xrt_mem.h)
2116

2217
# base component install
23-
install (FILES ${XRT_XRT_DETAIL_LEGACY_SRC}
18+
install (FILES ${XRT_XRT_DETAIL_HEADER_SRC} ${XRT_XRT_DETAIL_LEGACY_SRC}
2419
DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail
2520
COMPONENT ${XRT_BASE_DEV_COMPONENT})
2621

src/runtime_src/core/include/xrt/detail/windows/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@ set(XRT_WINDOWS_HEADER_SRC
88
types.h
99
uuid.h)
1010

11-
# xrt component deprecated install
11+
# Legacy deprecated install
1212
install (FILES ${XRT_WINDOWS_HEADER_SRC}
1313
DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/windows
14-
COMPONENT ${XRT_DEV_COMPONENT})
15-
16-
# xrt component install
17-
install (FILES ${XRT_WINDOWS_HEADER_SRC}
18-
DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail/windows
19-
COMPONENT ${XRT_DEV_COMPONENT})
14+
COMPONENT ${XRT_BASE_DEV_COMPONENT})
2015

2116
# base component install
2217
install (FILES ${XRT_WINDOWS_HEADER_SRC}

src/runtime_src/xdp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if (XRT_NPU)
3737
add_compile_options("-DSKIP_IOCTL")
3838
add_subdirectory(profile)
3939

40-
elseif(XRT_ALVEO)
40+
elseif(XRT_ALVEO OR XRT_EDGE)
4141

4242
add_subdirectory(appdebug)
4343
add_subdirectory(debug)

0 commit comments

Comments
 (0)