diff --git a/cmake/PCRE2.cmake b/cmake/PCRE2.cmake index af9c3492b..73a375eae 100644 --- a/cmake/PCRE2.cmake +++ b/cmake/PCRE2.cmake @@ -1,18 +1,4 @@ -# We can either use the system-installed PCRE or our bundled version. -# This is controlled by the cache variable FISH_USE_SYSTEM_PCRE2. -# Here we compute the default value for that variable. -# The actual decision is made by the Rust pcre2-sys crate, which searches for the -# pkg-config file and uses a vendored copy if it is not available. -if ((APPLE) AND (MAC_CODESIGN_ID)) - # On Mac, a codesigned fish will refuse to load a non-codesigned PCRE2 - # (e.g. from Homebrew) so default to bundled PCRE2. - set(USE_SYS_PCRE2_DEFAULT OFF) -else() - # Default to using the system PCRE2, if it can be found by the crate - set(USE_SYS_PCRE2_DEFAULT ON) -endif() - -set(FISH_USE_SYSTEM_PCRE2 ${USE_SYS_PCRE2_DEFAULT} CACHE BOOL +set(FISH_USE_SYSTEM_PCRE2 ON CACHE BOOL "Try to use PCRE2 from the system, instead of the pcre2-sys version") if(FISH_USE_SYSTEM_PCRE2) diff --git a/cmake/Rust.cmake b/cmake/Rust.cmake index bc744e210..f8601ef34 100644 --- a/cmake/Rust.cmake +++ b/cmake/Rust.cmake @@ -42,7 +42,7 @@ get_property( TARGET Rust::Rustc PROPERTY IMPORTED_LOCATION ) -# Tell Cargo where our build directory is so it can find config.h. +# Tell Cargo where our build directory is so it can find Cargo.toml. set(VARS_FOR_CARGO "FISH_BUILD_DIR=${fish_binary_dir}" "PREFIX=${CMAKE_INSTALL_PREFIX}"