From d28030e1e5046b24895a8a0dbee2acbe71b0cfc7 Mon Sep 17 00:00:00 2001 From: Adonis Ling Date: Fri, 14 Apr 2023 08:43:27 +0800 Subject: [PATCH] [chore](third-party) Configure the search paths for pkg-config and cmake (#18624) Currently, our third party libraries are built by autotools or cmake. Under some scenarios, we may use system-wide headers or libraries to build them which may make the build process fail. We can configure the search paths explicitly to help autotools and cmake find the right dependencies. --- thirdparty/build-thirdparty.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh index 0bc2deb3fa..2ad28cf9f7 100755 --- a/thirdparty/build-thirdparty.sh +++ b/thirdparty/build-thirdparty.sh @@ -173,6 +173,13 @@ pushd "${TP_DIR}/installed"/ ln -sf lib64 lib popd +# Configure the search paths for pkg-config and cmake +export PKG_CONFIG_PATH="${TP_DIR}/installed/lib64/pkgconfig" +export CMAKE_PREFIX_PATH="${TP_DIR}/installed" + +echo "PKG_CONFIG_PATH: ${PKG_CONFIG_PATH}" +echo "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}" + check_prerequest() { local CMD="$1" local NAME="$2"