Skip to content

Commit

Permalink
Fix boost library link issue when using static boost (#8193)
Browse files Browse the repository at this point in the history
Signed-off-by: rbramand <rbramand@amd.com>
Co-authored-by: rbramand <rbramand@amd.com>
  • Loading branch information
rbramand-xilinx and rbramand authored Jun 4, 2024
1 parent a75e984 commit 7528d6e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CMake/nativeLnx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ if (DEFINED ENV{XRT_BOOST_INSTALL})
set (Boost_LIBRARY_DIRS $ENV{XRT_BOOST_INSTALL}/lib)
endif()

# Targets linked with xrt static libraries on CentOS/RHEL somehow
# link with dynamic library of boost_system even when Boost_USE_STATIC_LIBS
# is set. So explicitly adding boost install path to linker search paths
link_directories($ENV{XRT_BOOST_INSTALL}/lib)

else()
find_package(Boost
REQUIRED COMPONENTS system filesystem program_options)
Expand Down

0 comments on commit 7528d6e

Please sign in to comment.