Fix the static PCRE2 build harder

Commit 4e79ec5f tried to restore the static PCRE2 build after the update to the
pcre2 crate, but it set an environment variable at configure time, not build
time.

Properly set the environment variable at build time.
This commit is contained in:
Peter Ammon 2024-10-05 20:15:29 -07:00
parent 1b9b893169
commit 521498143a
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -3,8 +3,7 @@ set(FISH_USE_SYSTEM_PCRE2 ON CACHE BOOL
if(FISH_USE_SYSTEM_PCRE2) if(FISH_USE_SYSTEM_PCRE2)
message(STATUS "Trying to use PCRE2 from the system") message(STATUS "Trying to use PCRE2 from the system")
set(FISH_PCRE2_BUILDFLAG "")
else() else()
message(STATUS "Forcing static build of PCRE2") message(STATUS "Forcing static build of PCRE2")
set(ENV{PCRE2_SYS_STATIC} "1") set(FISH_PCRE2_BUILDFLAG "PCRE2_SYS_STATIC=1")
endif(FISH_USE_SYSTEM_PCRE2) endif(FISH_USE_SYSTEM_PCRE2)

View file

@ -56,5 +56,6 @@ set(VARS_FOR_CARGO
"LOCALEDIR=${CMAKE_INSTALL_FULL_LOCALEDIR}" "LOCALEDIR=${CMAKE_INSTALL_FULL_LOCALEDIR}"
"CARGO_TARGET_DIR=${FISH_RUST_BUILD_DIR}" "CARGO_TARGET_DIR=${FISH_RUST_BUILD_DIR}"
"CARGO_BUILD_RUSTC=${RUSTC_EXECUTABLE}" "CARGO_BUILD_RUSTC=${RUSTC_EXECUTABLE}"
"${FISH_PCRE2_BUILDFLAG}"
"RUSTFLAGS=$ENV{RUSTFLAGS} ${rust_debugflags}" "RUSTFLAGS=$ENV{RUSTFLAGS} ${rust_debugflags}"
) )