diff --git a/project/externals/abseil.cmake b/project/externals/abseil.cmake index 076f86b..2b8f401 100644 --- a/project/externals/abseil.cmake +++ b/project/externals/abseil.cmake @@ -17,6 +17,7 @@ ExternalProject_Add( CMAKE_ARGS ${common_cmake_args} -DCMAKE_BUILD_TYPE=Release + -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=\$ORIGIN:\$ORIGIN/../3rd BUILD_IN_SOURCE 1 BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM} INSTALL_COMMAND make -s install -j${BUILDING_JOBS_NUM} diff --git a/project/externals/cyrus-sasl.cmake b/project/externals/cyrus-sasl.cmake index 6c5771e..82a4919 100644 --- a/project/externals/cyrus-sasl.cmake +++ b/project/externals/cyrus-sasl.cmake @@ -17,6 +17,7 @@ ExternalProject_Add( CONFIGURE_COMMAND ${common_configure_envs} "LDFLAGS=${ld_flags} -lcrypto -lcrypt -ldb-5.1" + "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64:${CMAKE_INSTALL_PREFIX}/lib/berkeleydb-5.1.29:$LD_LIBRARY_PATH" ./autogen.sh ${common_configure_args} --disable-static --enable-shared diff --git a/project/externals/fbthrift.cmake b/project/externals/fbthrift.cmake index 89a7713..e051800 100644 --- a/project/externals/fbthrift.cmake +++ b/project/externals/fbthrift.cmake @@ -18,7 +18,7 @@ ExternalProject_Add( CMAKE_COMMAND env PATH=${CMAKE_INSTALL_PREFIX}/bin:$ENV{PATH} ${CMAKE_COMMAND} CMAKE_ARGS ${common_cmake_args} - "-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -static-libgcc -Wl,-rpath=\$ORIGIN/../lib" + "-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -static-libgcc -Wl,-rpath=\$ORIGIN/../lib:\$ORIGIN/../lib64" -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=ON -Denable_tests=OFF diff --git a/project/externals/libevent.cmake b/project/externals/libevent.cmake index db270a7..0cb2a33 100644 --- a/project/externals/libevent.cmake +++ b/project/externals/libevent.cmake @@ -22,6 +22,7 @@ ExternalProject_Add( -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON + -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=\$ORIGIN:\$ORIGIN/../3rd BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM} BUILD_IN_SOURCE 1 INSTALL_COMMAND make -s install -j${BUILDING_JOBS_NUM} diff --git a/project/externals/llvm.cmake b/project/externals/llvm.cmake index be569bb..82355b6 100644 --- a/project/externals/llvm.cmake +++ b/project/externals/llvm.cmake @@ -4,6 +4,10 @@ set(name llvm) set(source_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/source) +set(LLVM_ENV_COMMAND + "env" + "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64:${BERKELEYDB_LIB_DIR}:$ENV{LD_LIBRARY_PATH}" +) ExternalProject_Add( ${name} @@ -29,7 +33,7 @@ ExternalProject_Add( -DLLVM_PARALLEL_COMPILE_JOBS=${BUILDING_JOBS_NUM} -DLLVM_PARALLEL_LINK_JOBS=${BUILDING_JOBS_NUM} - BUILD_COMMAND ninja -C build install + BUILD_COMMAND ${LLVM_ENV_COMMAND} ninja -C build install BUILD_IN_SOURCE 1 INSTALL_COMMAND "" LOG_CONFIGURE TRUE