-
Notifications
You must be signed in to change notification settings - Fork 532
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
53 lines (39 loc) · 1.78 KB
/
CMakeLists.txt
File metadata and controls
53 lines (39 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.
# =======================================================
# Application Debug Plugin Build
#
# This plugin is only available on Linux and contains
# the functions that are called from the xprint and
# xstatus gdb extension commands
# =======================================================
if (NOT WIN32)
set(APPDEBUG_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
file(GLOB APPDEBUG_FILES
"${APPDEBUG_DIR}/*.h"
"${APPDEBUG_DIR}/*.cpp"
)
# Since the functions in the appdebug plugin are only accessed via gdb,
# we need to compile the plugin with -g so the functions aren't optimized
# away and are visible to gdb.
set_source_files_properties (${APPDEBUG_FILES} PROPERTIES COMPILE_FLAGS -g)
add_library(xdp_appdebug_plugin SHARED ${APPDEBUG_FILES})
# The application debug plugin is specific to OpenCL applications, so
# we have a dependency to xilinxopencl
add_dependencies(xdp_appdebug_plugin xrt_coreutil xilinxopencl)
target_link_libraries(xdp_appdebug_plugin PRIVATE xrt_coreutil xilinxopencl)
set_target_properties(xdp_appdebug_plugin PROPERTIES VERSION ${XRT_VERSION_STRING} SOVERSION ${XRT_SOVERSION})
install (TARGETS xdp_appdebug_plugin
RUNTIME DESTINATION ${XDP_PLUGIN_INSTALL_DIR} COMPONENT ${XRT_COMPONENT}
LIBRARY DESTINATION ${XDP_PLUGIN_INSTALL_DIR} COMPONENT ${XRT_COMPONENT} ${XRT_NAMELINK_SKIP}
)
# We also need to copy the python scripts that contain the gdb connection.
# Only install these files for PCIe device for now, which is native build
if (NOT XRT_EDGE)
set (APPDEBUG_INSTALL_PREFIX "${XRT_INSTALL_DIR}/share/appdebug")
install (FILES
${APPDEBUG_DIR}/appdebug.py
${APPDEBUG_DIR}/appdebugint.py
DESTINATION ${APPDEBUG_INSTALL_PREFIX})
endif()
endif()