From 4e79ec5f0ef5d5b1d7df2899df00c4b118db945b Mon Sep 17 00:00:00 2001 From: Peter Ammon Date: Sun, 29 Sep 2024 19:42:48 -0700 Subject: [PATCH] CMake: Restore static PCRE2 builds The recent update to the rust-pcre2 crate lost the property where a static PCRE2 build could be enabled with a Cargo feature. This means that static PCRE2 builds can no longer be forced. Switch to setting the "PCRE2_SYS_STATIC" variable again, which is how the official rust-pcre2 crate expects to work. --- cmake/PCRE2.cmake | 2 +- cmake/Rust.cmake | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/PCRE2.cmake b/cmake/PCRE2.cmake index 73a375eae..372cadd58 100644 --- a/cmake/PCRE2.cmake +++ b/cmake/PCRE2.cmake @@ -6,5 +6,5 @@ if(FISH_USE_SYSTEM_PCRE2) set(FISH_PCRE2_BUILDFLAG "") else() message(STATUS "Forcing static build of PCRE2") - set(FISH_PCRE2_BUILDFLAG "CARGO_FEATURE_STATIC_PCRE2=1") + set(ENV{PCRE2_SYS_STATIC} "1") endif(FISH_USE_SYSTEM_PCRE2) diff --git a/cmake/Rust.cmake b/cmake/Rust.cmake index 7a7949663..ba66a0078 100644 --- a/cmake/Rust.cmake +++ b/cmake/Rust.cmake @@ -56,6 +56,5 @@ set(VARS_FOR_CARGO "LOCALEDIR=${CMAKE_INSTALL_FULL_LOCALEDIR}" "CARGO_TARGET_DIR=${FISH_RUST_BUILD_DIR}" "CARGO_BUILD_RUSTC=${RUSTC_EXECUTABLE}" - "${FISH_PCRE2_BUILDFLAG}" "RUSTFLAGS=$ENV{RUSTFLAGS} ${rust_debugflags}" )