From 1160693e4cf9f4c5e369905027ca318c94318bc4 Mon Sep 17 00:00:00 2001 From: Cai Yudong Date: Tue, 29 Mar 2022 15:13:30 +0800 Subject: [PATCH] Fix centos build error (#16251) Signed-off-by: yudong.cai --- internal/core/CMakeLists.txt | 2 +- internal/core/thirdparty/knowhere/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/core/CMakeLists.txt b/internal/core/CMakeLists.txt index 31773cedf8..65915dce74 100644 --- a/internal/core/CMakeLists.txt +++ b/internal/core/CMakeLists.txt @@ -96,7 +96,7 @@ set( MILVUS_THIRDPARTY_SRC ${PROJECT_SOURCE_DIR}/thirdparty ) # This will set RPATH to all excutable TARGET # self-installed dynamic libraries will be correctly linked by excutable -set( CMAKE_INSTALL_RPATH "/usr/lib" "${CMAKE_INSTALL_PREFIX}/lib" ) +set( CMAKE_INSTALL_RPATH "/usr/lib" "${CMAKE_INSTALL_PREFIX}/lib" "${CMAKE_INSTALL_PREFIX}/lib64" ) set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE ) # **************************** Dependencies **************************** diff --git a/internal/core/thirdparty/knowhere/CMakeLists.txt b/internal/core/thirdparty/knowhere/CMakeLists.txt index 38119f34f7..6b4a14b1d3 100644 --- a/internal/core/thirdparty/knowhere/CMakeLists.txt +++ b/internal/core/thirdparty/knowhere/CMakeLists.txt @@ -61,8 +61,7 @@ macro(build_knowhere) set_target_properties( knowhere PROPERTIES IMPORTED_GLOBAL TRUE - IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}knowhere${CMAKE_SHARED_LIBRARY_SUFFIX} - IMPORTED_IMPLIB ${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}knowhere${CMAKE_SHARED_LIBRARY_SUFFIX}.a + IMPORTED_LOCATION ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}knowhere${CMAKE_SHARED_LIBRARY_SUFFIX} INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/${CMAKE_INSTALL_INCLUDEDIR}) add_dependencies(knowhere knowhere_ep)