fix: avoid vendor libstdc++ conflicts
This commit is contained in:
parent
f443a7ce53
commit
c43bab8d4c
@ -18,9 +18,6 @@ set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/output" CACHE PATH "" FORCE)
|
||||
set(CMAKE_BUILD_RPATH "\$ORIGIN:\$ORIGIN/../lib")
|
||||
set(CMAKE_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/../lib")
|
||||
|
||||
# Use transitive RPATH so CLion can run build-tree test executables without
|
||||
# manually setting LD_LIBRARY_PATH for indirect third-party dependencies.
|
||||
add_link_options(-Wl,--disable-new-dtags)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
|
||||
@ -55,7 +55,17 @@ function(setup_external_libs ARCH)
|
||||
|
||||
# ---- library dirs ----
|
||||
if(EXISTS "${FULL_PATH}/lib")
|
||||
file(GLOB _BUNDLED_LIBSTDCXX_FILES
|
||||
"${FULL_PATH}/lib/libstdc++.so"
|
||||
"${FULL_PATH}/lib/libstdc++.so.*"
|
||||
)
|
||||
if(_BUNDLED_LIBSTDCXX_FILES)
|
||||
message(STATUS
|
||||
"${LIB_NAME}: excluding vendor lib directory from global "
|
||||
"link paths because it contains a private libstdc++")
|
||||
else()
|
||||
list(APPEND LIBRARY_DIRS "${FULL_PATH}/lib")
|
||||
endif()
|
||||
set(HAS_LIB TRUE)
|
||||
|
||||
# Collect shared libs for install: *.so and *.so.*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user