Skip to content

Commit

Permalink
protobuf-src: don't let CMake install to lib64
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
petrosagg authored and benesch committed May 23, 2024
1 parent 25d69f9 commit 4256584
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions protobuf-src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ fn main() -> Result<(), Box<dyn Error>> {
.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());
Expand Down

0 comments on commit 4256584

Please sign in to comment.