diff --git a/build/build-win22.sh b/build/build-win22.sh index 94f0d18e3e7..31186b82b17 100644 --- a/build/build-win22.sh +++ b/build/build-win22.sh @@ -38,6 +38,9 @@ nocmake=0 noabi=0 dbg=0 release=1 +alveo_build=0 +npu_build=0 +base_build=0 cmake_flags="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" while [ $# -gt 0 ]; do case "$1" in @@ -79,6 +82,22 @@ while [ $# -gt 0 ]; do cmake_flags+= " -DXRT_ENABLE_HIP=ON" shift ;; + -base) + shift + base_build=1 + cmake_flags+= " -DXRT_BASE=1" + ;; + -alveo) + shift + alveo_build=1 + cmake_flags+=" -DXRT_ALVEO=1" + ;; + -npu) + shift + npu_build=1 + cmake_flags+=" -DXDP_CLIENT_BUILD_CMAKE=yes" + cmake_flags+=" -DXRT_NPU=1" + ;; -j) shift jcore=$1 @@ -99,6 +118,11 @@ while [ $# -gt 0 ]; do esac done +if [[ $((npu_build + alveo_build + base_build)) > 1 ]]; then + echo "build.sh: -npu, -alveo, -base are mutually exclusive" + exit 1 +fi + BOOST=$(sed -e 's|/mnt/\([A-Za-z]\)/\(.*\)|\1:/\2|' -e 's|/|\\|g' <<< $BOOST) KHRONOS=$(sed -e 's|/mnt/\([A-Za-z]\)/\(.*\)|\1:/\2|' -e 's|/|\\|g' <<< $KHRONOS) diff --git a/build/build.sh b/build/build.sh index a479a927cb7..9734e62b64a 100755 --- a/build/build.sh +++ b/build/build.sh @@ -108,7 +108,9 @@ static_boost="" ertbsp="" ertfw="" werror=1 -alveo=1 +alveo_build=0 +npu_build=0 +base_build=0 xclbinutil=0 xrt_install_prefix="/opt/xilinx" cmake_flags="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" @@ -155,9 +157,20 @@ while [ $# -gt 0 ]; do shift cmake_flags+=" -DXRT_ENABLE_HIP=ON" ;; + -base) + shift + base_build=1 + noert=1 + cmake_flags+=" -DXRT_BASE=1" + ;; + -alveo) + shift + alveo_build=1 + cmake_flags+=" -DXRT_ALVEO=1" + ;; -npu) shift - alveo=0 + npu_build=1 noert=1 cmake_flags+=" -DXDP_CLIENT_BUILD_CMAKE=yes" cmake_flags+=" -DXRT_NPU=1" @@ -251,6 +264,11 @@ while [ $# -gt 0 ]; do esac done +if [[ $((npu_build + alveo_build + base_build)) > 1 ]]; then + echo "build.sh: -npu, -alveo, -base are mutually exclusive" + exit 1 +fi + debug_dir=${DEBUG_DIR:-Debug} release_dir=${REL_DIR:-Release} edge_dir=${EDGE_DIR:-Edge} @@ -263,12 +281,6 @@ cmake_flags+=" -DXRT_ENABLE_WERROR=$werror" # set CMAKE_INSTALL_PREFIX cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$xrt_install_prefix -DXRT_INSTALL_PREFIX=$xrt_install_prefix" -# Set CMake variable indicating build for Alveo -# Specifying '-npu' disables Alveo -if [[ $alveo == 1 ]]; then - cmake_flags+=" -DXRT_ALVEO=1" -fi - here=$PWD cd $BUILDDIR diff --git a/src/CMake/components.cmake b/src/CMake/components.cmake index 331ff2b1b1d..248d78da911 100644 --- a/src/CMake/components.cmake +++ b/src/CMake/components.cmake @@ -10,27 +10,76 @@ if (NOT WIN32) elseif (${LINUX_FLAVOR} MATCHES "^(rhel|centos)") set (XRT_DEV_COMPONENT_SUFFIX "devel") endif() -endif(NOT WIN32) - -# Default component name for any install() command without the COMPONENT argument -# The default component is the xrt run-time component, if XRT_DEV_COMPONENT is -# set to something different then a development component will be created with -# link libraries and header which are then excluded from runtime component -set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "xrt") - +else() + set(LINUX_FLAVOR "none") +endif() + +# The default XRT build is legacy +if (NOT XRT_BASE AND NOT XRT_NPU AND NOT XRT_ALVEO) + message("-- Defaulting to legacy XRT build") + set(XRT_XRT 1) +endif() + # Enable development package by specifying development component name -# If XRT_DEV_COMPONENT is same DEFAULT_COMPONENT then only that package -# is created with both development and run-time content. -#set (XRT_DEV_COMPONENT "xrt-dev") +# If XRT_{PKG}_DEV_COMPONENT is same XRT_{PKG}_COMPONENT then only +# that package is created with both development and run-time content. set (XRT_COMPONENT "xrt") set (XRT_DEV_COMPONENT "xrt") - set (XRT_BASE_COMPONENT "base") -set (XRT_BASE_DEV_COMPONENT "base-${XRT_DEV_COMPONENT_SUFFIX}") +set (XRT_BASE_DEV_COMPONENT "base") +set (XRT_ALVEO_COMPONENT "alveo") +set (XRT_ALVEO_DEV_COMPONENT "alveo") +set (XRT_NPU_COMPONENT "npu") +set (XRT_NPU_DEV_COMPONENT "npu") + +if (NOT WIN32 AND ${LINUX_FLAVOR} MATCHES "^(ubuntu|debian|rhel|centos)") + if (${LINUX_FLAVOR} MATCHES "^(ubuntu|debian)") + set (XRT_DEV_COMPONENT_SUFFIX "dev") + elseif (${LINUX_FLAVOR} MATCHES "^(rhel|centos)") + set (XRT_DEV_COMPONENT_SUFFIX "devel") + endif() + + set (XRT_BASE_DEV_COMPONENT "base-${XRT_DEV_COMPONENT_SUFFIX}") + set (XRT_ALVEO_DEV_COMPONENT "alveo-${XRT_DEV_COMPONENT_SUFFIX}") + set (XRT_NPU_DEV_COMPONENT "npu-${XRT_DEV_COMPONENT_SUFFIX}") +endif() + +# BASE builds a deployment and development package of everything +# enabled by XRT_BASE +if (XRT_BASE) + # For the time being, dump everything into base that has not + # been explicitly marked for base + set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "base") + set (XRT_COMPONENT ${XRT_BASE_COMPONENT}) + set (XRT_DEV_COMPONENT ${XRT_BASE_DEV_COMPONENT}) +endif(XRT_BASE) -# For NPU builds the defalt component is "npu". +# 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 if (XRT_NPU) + set (XRT_BASE_COMPONENT "npu") + set (XRT_BASE_DEV_COMPONENT "npu") + set (XRT_NPU_COMPONENT "npu") + set (XRT_NPU_DEV_COMPONENT "npu") + + # For the time being, dump everything into npu that has not + # been explicitly marked alveo or npu set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "npu") - set (XRT_COMPONENT "npu") - set (XRT_DEV_COMPONENT "npu") + set (XRT_COMPONENT ${XRT_NPU_COMPONENT}) + set (XRT_DEV_COMPONENT ${XRT_NPU_DEV_COMPONENT}) endif(XRT_NPU) + +# Legacy, build one XRT package for both deployment and development +# This build is for alveo +if (XRT_XRT) + set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "xrt") + 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) +endif(XRT_XRT) + diff --git a/src/CMake/config/xrt-edge.fp.in b/src/CMake/config/xrt-edge.fp.in index 17301bd9058..01a14b60338 100644 --- a/src/CMake/config/xrt-edge.fp.in +++ b/src/CMake/config/xrt-edge.fp.in @@ -31,9 +31,6 @@ else() if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/xrt-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/xrt-targets.cmake") endif() - if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/xrt-dev-targets.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/xrt-dev-targets.cmake") - endif() endif() get_filename_component(@PROJECT_NAME@_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE) diff --git a/src/CMake/config/xrt.fp.in b/src/CMake/config/xrt.fp.in index a25d7dc1680..449dd265a21 100644 --- a/src/CMake/config/xrt.fp.in +++ b/src/CMake/config/xrt.fp.in @@ -31,9 +31,6 @@ else() if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/xrt-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/xrt-targets.cmake") endif() - if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/xrt-dev-targets.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/xrt-dev-targets.cmake") - endif() endif() get_filename_component(@PROJECT_NAME@_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE) diff --git a/src/CMake/findpackage.cmake b/src/CMake/findpackage.cmake index 3cdfb4f816b..57b6d2e38c5 100644 --- a/src/CMake/findpackage.cmake +++ b/src/CMake/findpackage.cmake @@ -44,18 +44,9 @@ install ( # This will generate a file that details all targets we have marked for export # as part of the xrt-targets export group # It will provide information such as the library file names and locations post install -if (NOT WIN32) install( EXPORT xrt-targets NAMESPACE ${PROJECT_NAME}:: DESTINATION ${XRT_INSTALL_DIR}/share/cmake/${PROJECT_NAME} ) -endif() -if (${XRT_NATIVE_BUILD} STREQUAL "yes") -install( - EXPORT xrt-dev-targets - NAMESPACE ${PROJECT_NAME}:: - DESTINATION ${XRT_INSTALL_DIR}/share/cmake/${PROJECT_NAME} - ) -endif() diff --git a/src/CMake/nativeLnx.cmake b/src/CMake/nativeLnx.cmake index a2344b81ce1..f86cd78c994 100644 --- a/src/CMake/nativeLnx.cmake +++ b/src/CMake/nativeLnx.cmake @@ -85,8 +85,7 @@ if ( (${CMAKE_VERSION} VERSION_GREATER "3.16.0") set(XRT_STATIC_BUILD ON) endif() -# XRT install components -include (CMake/components.cmake) +include(CMake/components.cmake) # Boost Libraries include (CMake/boostUtil.cmake) diff --git a/src/CMake/nativeWin.cmake b/src/CMake/nativeWin.cmake index fb6d23db505..d792cd8c4da 100644 --- a/src/CMake/nativeWin.cmake +++ b/src/CMake/nativeWin.cmake @@ -24,7 +24,6 @@ ELSE(GIT_FOUND) MESSAGE(FATAL_ERROR "Looking for GIT - not found") endif(GIT_FOUND) -# XRT install components include(CMake/components.cmake) include(FindBoost) diff --git a/src/CMake/version.cmake b/src/CMake/version.cmake index ffb05ba08c2..065000b68d2 100644 --- a/src/CMake/version.cmake +++ b/src/CMake/version.cmake @@ -93,11 +93,6 @@ configure_file( ${PROJECT_BINARY_DIR}/gen/version.json ) -# xrt component install -install(FILES ${PROJECT_BINARY_DIR}/gen/version.h - DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail - COMPONENT ${XRT_DEV_COMPONENT}) - # xrt component install install(FILES ${PROJECT_BINARY_DIR}/gen/version.h DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail @@ -106,7 +101,7 @@ install(FILES ${PROJECT_BINARY_DIR}/gen/version.h if (${XRT_NATIVE_BUILD} STREQUAL "yes") install(FILES ${PROJECT_BINARY_DIR}/gen/version.json DESTINATION ${XRT_INSTALL_DIR} - COMPONENT ${XRT_COMPONENT}) + COMPONENT ${XRT_BASE_DEV_COMPONENT}) endif() # This is not required on MPSoC platform. To avoid yocto error, do NOT intall diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fedad362bfd..5ba8a8e9314 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,26 +22,6 @@ include_directories( include(CMake/settings.cmake) -# Default component name for any install() command without the COMPONENT argument -# The default component is the xrt run-time component, if XRT_DEV_COMPONENT is -# set to something different then a development component will be created with -# link libraries and header which are then excluded from runtime component -set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "xrt") - -# Enable development package by specifying development component name -# If XRT_DEV_COMPONENT is same DEFAULT_COMPONENT then only that package -# is created with both development and run-time content. -#set (XRT_DEV_COMPONENT "xrt-dev") -set (XRT_COMPONENT "xrt") -set (XRT_DEV_COMPONENT "xrt") - -# For NPU builds the defalt component is "npu". -if (XRT_NPU) - set (CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "npu") - set (XRT_COMPONENT "npu") - set (XRT_DEV_COMPONENT "npu") -endif(XRT_NPU) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${XRT_SOURCE_DIR}/CMake/") # This makes aiebu submodule use ELFIO from XRT diff --git a/src/runtime_src/core/common/CMakeLists.txt b/src/runtime_src/core/common/CMakeLists.txt index 02425a4a531..04e06309680 100644 --- a/src/runtime_src/core/common/CMakeLists.txt +++ b/src/runtime_src/core/common/CMakeLists.txt @@ -122,15 +122,8 @@ if (NOT WIN32) target_link_libraries(xrt_coreutil_static INTERFACE uuid dl rt pthread) endif() ################################################################ - -install(TARGETS xrt_coreutil - EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - install(TARGETS xrt_coreutil xrt_coreutil_static - EXPORT xrt-dev-targets - ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} -) + EXPORT xrt-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_BASE_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_BASE_COMPONENT} NAMELINK_COMPONENT ${XRT_BASE_DEV_COMPONENT} + ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_BASE_DEV_COMPONENT}) diff --git a/src/runtime_src/core/include/xrt/CMakeLists.txt b/src/runtime_src/core/include/xrt/CMakeLists.txt index 6fbc7416c3d..18ae7aa044e 100644 --- a/src/runtime_src/core/include/xrt/CMakeLists.txt +++ b/src/runtime_src/core/include/xrt/CMakeLists.txt @@ -10,11 +10,6 @@ set(XRT_XRT_HEADER_SRC xrt_kernel.h xrt_uuid.h) -# xrt component install -install (FILES ${XRT_XRT_HEADER_SRC} - DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt - COMPONENT ${XRT_DEV_COMPONENT}) - # base component install install (FILES ${XRT_XRT_HEADER_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt diff --git a/src/runtime_src/core/include/xrt/deprecated/CMakeLists.txt b/src/runtime_src/core/include/xrt/deprecated/CMakeLists.txt index c4475e86f48..adf4ad766c3 100644 --- a/src/runtime_src/core/include/xrt/deprecated/CMakeLists.txt +++ b/src/runtime_src/core/include/xrt/deprecated/CMakeLists.txt @@ -9,11 +9,6 @@ set(XRT_DEPRECATED_HEADER_SRC xclerr.h ) -# Legacy install -install (FILES ${XRT_DEPRECATED_HEADER_SRC} - DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/deprecated - COMPONENT ${XRT_DEV_COMPONENT}) - # Base component install install (FILES ${XRT_DEPRECATED_HEADER_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/deprecated diff --git a/src/runtime_src/core/include/xrt/detail/CMakeLists.txt b/src/runtime_src/core/include/xrt/detail/CMakeLists.txt index b371779dbe4..1490ee68e23 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) -# xrt component install -install (FILES ${XRT_XRT_DETAIL_HEADER_SRC} - DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail - COMPONENT ${XRT_DEV_COMPONENT}) - # base component install install (FILES ${XRT_XRT_DETAIL_HEADER_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail @@ -24,11 +19,6 @@ set(XRT_XRT_DETAIL_LEGACY_SRC xrt_error_code.h xrt_mem.h) -# xrt component install -install (FILES ${XRT_XRT_DETAIL_LEGACY_SRC} - DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail - COMPONENT ${XRT_DEV_COMPONENT}) - # base component install install (FILES ${XRT_XRT_DETAIL_LEGACY_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/detail diff --git a/src/runtime_src/core/include/xrt/experimental/CMakeLists.txt b/src/runtime_src/core/include/xrt/experimental/CMakeLists.txt index 40ef4bbccf7..2902474465a 100644 --- a/src/runtime_src/core/include/xrt/experimental/CMakeLists.txt +++ b/src/runtime_src/core/include/xrt/experimental/CMakeLists.txt @@ -30,11 +30,6 @@ set(XRT_EXPERIMENTAL_HEADER_SRC xrt_xclbin.h xclbin_util.h) -# xrt component install -install (FILES ${XRT_EXPERIMENTAL_HEADER_SRC} - DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/experimental - COMPONENT ${XRT_DEV_COMPONENT}) - # base component install install (FILES ${XRT_EXPERIMENTAL_HEADER_SRC} DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/xrt/experimental diff --git a/src/runtime_src/core/pcie/CMakeLists.txt b/src/runtime_src/core/pcie/CMakeLists.txt index 4fe931e3a62..1ef7242e46a 100644 --- a/src/runtime_src/core/pcie/CMakeLists.txt +++ b/src/runtime_src/core/pcie/CMakeLists.txt @@ -6,9 +6,9 @@ include_directories( ) xrt_add_subdirectory(common) -xrt_add_subdirectory(tools) if(NOT WIN32) + xrt_add_subdirectory(tools) xrt_add_subdirectory(linux) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") # Emulation flow only works on x86_64 diff --git a/src/runtime_src/core/pcie/emulation/hw_emu/CMakeLists.txt b/src/runtime_src/core/pcie/emulation/hw_emu/CMakeLists.txt index 7c60dac24a3..6cce3826758 100644 --- a/src/runtime_src/core/pcie/emulation/hw_emu/CMakeLists.txt +++ b/src/runtime_src/core/pcie/emulation/hw_emu/CMakeLists.txt @@ -61,15 +61,10 @@ target_link_libraries(xrt_hwemu_static uuid ) -install (TARGETS xrt_hwemu - EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - install (TARGETS xrt_hwemu xrt_hwemu_static - EXPORT xrt-dev-targets + EXPORT xrt-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} ) diff --git a/src/runtime_src/core/pcie/emulation/sw_emu/CMakeLists.txt b/src/runtime_src/core/pcie/emulation/sw_emu/CMakeLists.txt index 82777ec7431..748e636d0cb 100644 --- a/src/runtime_src/core/pcie/emulation/sw_emu/CMakeLists.txt +++ b/src/runtime_src/core/pcie/emulation/sw_emu/CMakeLists.txt @@ -55,14 +55,9 @@ target_link_libraries(xrt_swemu_static uuid ) -install (TARGETS xrt_swemu - EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - install (TARGETS xrt_swemu xrt_swemu_static - EXPORT xrt-dev-targets + EXPORT xrt-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} ) diff --git a/src/runtime_src/core/pcie/linux/CMakeLists.txt b/src/runtime_src/core/pcie/linux/CMakeLists.txt index 443cdb212d0..5ea1d9ab8cc 100644 --- a/src/runtime_src/core/pcie/linux/CMakeLists.txt +++ b/src/runtime_src/core/pcie/linux/CMakeLists.txt @@ -67,14 +67,9 @@ target_link_libraries(xrt_core_static pthread ) -install(TARGETS xrt_core - EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - install(TARGETS xrt_core xrt_core_static - EXPORT xrt-dev-targets + EXPORT xrt-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} ) diff --git a/src/runtime_src/core/pcie/noop/CMakeLists.txt b/src/runtime_src/core/pcie/noop/CMakeLists.txt index f5f880de2f6..4f68d4ae460 100644 --- a/src/runtime_src/core/pcie/noop/CMakeLists.txt +++ b/src/runtime_src/core/pcie/noop/CMakeLists.txt @@ -31,12 +31,7 @@ set_target_properties(xrt_noop PROPERTIES install(TARGETS xrt_noop EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - -install(TARGETS xrt_noop - EXPORT xrt-dev-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} ) diff --git a/src/runtime_src/core/pcie/tools/CMakeLists.txt b/src/runtime_src/core/pcie/tools/CMakeLists.txt index b1db0afe28e..ef512573be6 100644 --- a/src/runtime_src/core/pcie/tools/CMakeLists.txt +++ b/src/runtime_src/core/pcie/tools/CMakeLists.txt @@ -1,11 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (C) 2019-2021 Xilinx, Inc. All rights reserved. # -if(NOT WIN32) - add_subdirectory(cloud-daemon) +add_subdirectory(cloud-daemon) - if(XRT_ALVEO) - add_subdirectory(xbflash.qspi) - endif(XRT_ALVEO) - -endif(NOT WIN32) +if(XRT_ALVEO) + add_subdirectory(xbflash.qspi) +endif(XRT_ALVEO) diff --git a/src/runtime_src/core/pcie/windows/alveo/CMakeLists.txt b/src/runtime_src/core/pcie/windows/alveo/CMakeLists.txt index 8fa5fc582eb..f452b68b197 100644 --- a/src/runtime_src/core/pcie/windows/alveo/CMakeLists.txt +++ b/src/runtime_src/core/pcie/windows/alveo/CMakeLists.txt @@ -47,14 +47,9 @@ endif() # RUNTIME target and the corresponding import library is treated as an # ARCHIVE target. All Windows-based systems including Cygwin are DLL # platforms. -install(TARGETS xrt_core - EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - install(TARGETS xrt_core xrt_core_static - EXPORT xrt-dev-targets + EXPORT xrt-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} ) diff --git a/src/runtime_src/core/tools/xbtracer/src/lib/CMakeLists.txt b/src/runtime_src/core/tools/xbtracer/src/lib/CMakeLists.txt index 6d166dddb4a..ffb1dacb0e7 100644 --- a/src/runtime_src/core/tools/xbtracer/src/lib/CMakeLists.txt +++ b/src/runtime_src/core/tools/xbtracer/src/lib/CMakeLists.txt @@ -20,12 +20,7 @@ endif() install(TARGETS xrt_capture EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - -install(TARGETS xrt_capture - EXPORT xrt-dev-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} ) diff --git a/src/runtime_src/hip/CMakeLists.txt b/src/runtime_src/hip/CMakeLists.txt index adcca972cbf..9cb5ab6bf86 100644 --- a/src/runtime_src/hip/CMakeLists.txt +++ b/src/runtime_src/hip/CMakeLists.txt @@ -47,14 +47,9 @@ set_target_properties(xrt_hip PROPERTIES install(TARGETS xrt_hip EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - -install(TARGETS xrt_hip - EXPORT xrt-dev-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} ) # Release headers diff --git a/src/runtime_src/xocl/CMakeLists.txt b/src/runtime_src/xocl/CMakeLists.txt index 4ab9d47fd7d..3fe86eec011 100644 --- a/src/runtime_src/xocl/CMakeLists.txt +++ b/src/runtime_src/xocl/CMakeLists.txt @@ -90,22 +90,11 @@ target_link_libraries(xilinxopencl endif () -# install(TARGETS xilinxopencl -# ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} -# LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT xrt NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} -# RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -# ) - -install(TARGETS xilinxopencl - EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - install(TARGETS xilinxopencl xilinxopencl_static - EXPORT xrt-dev-targets + EXPORT xrt-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} ) # Release OpenCL extension headers diff --git a/src/runtime_src/xrt/CMakeLists.txt b/src/runtime_src/xrt/CMakeLists.txt index 8c564f6f812..c4a402c275c 100644 --- a/src/runtime_src/xrt/CMakeLists.txt +++ b/src/runtime_src/xrt/CMakeLists.txt @@ -56,14 +56,9 @@ target_link_libraries(xrt++ set_target_properties(xrt++ PROPERTIES VERSION ${XRT_VERSION_STRING} SOVERSION ${XRT_SOVERSION}) -install(TARGETS xrt++ - EXPORT xrt-targets - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} ${XRT_NAMELINK_SKIP} - RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} -) - install(TARGETS xrt++ xrt++_static - EXPORT xrt-dev-targets + EXPORT xrt-targets + RUNTIME DESTINATION ${XRT_INSTALL_BIN_DIR} COMPONENT ${XRT_COMPONENT} + LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_COMPONENT} NAMELINK_COMPONENT ${XRT_DEV_COMPONENT} ARCHIVE DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} - LIBRARY DESTINATION ${XRT_INSTALL_LIB_DIR} COMPONENT ${XRT_DEV_COMPONENT} ${XRT_NAMELINK_ONLY} )