From 4256584b007d7eebb2a779c8dfd5ee3ecb147343 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Thu, 23 May 2024 16:34:47 +0300 Subject: [PATCH] protobuf-src: don't let CMake install to lib64 `CMAKE_INSTALL_LIBDIR` is inferred as "lib64" on some platforms, but we want a stable location that we can add to the linker search path. Since we're not actually installing to /usr or /usr/local, there's no harm to always using "lib" here. Signed-off-by: Petros Angelatos --- protobuf-src/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/protobuf-src/build.rs b/protobuf-src/build.rs index 0a92dbbf..1f6705e6 100644 --- a/protobuf-src/build.rs +++ b/protobuf-src/build.rs @@ -21,6 +21,11 @@ fn main() -> Result<(), Box> { .define("protobuf_BUILD_TESTS", "OFF") .define("protobuf_DEBUG_POSTFIX", "") .define("CMAKE_CXX_STANDARD", "14") + // CMAKE_INSTALL_LIBDIR is inferred as "lib64" on some platforms, but we + // want a stable location that we can add to the linker search path. + // Since we're not actually installing to /usr or /usr/local, there's no + // harm to always using "lib" here. + .define("CMAKE_INSTALL_LIBDIR", "lib") .build(); println!("cargo:rustc-env=INSTALL_DIR={}", install_dir.display());