diff --git a/cmake/FindRust.cmake b/cmake/FindRust.cmake index 227d0b4552..5d7e838bd8 100644 --- a/cmake/FindRust.cmake +++ b/cmake/FindRust.cmake @@ -488,7 +488,7 @@ elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") else() set(CARGO_BUILD_TYPE "debug") endif() -string(STRIP "${RUSTFLAGS}" RUSTFLAGS) +string(STRIP "${RUSTFLAGS} $ENV{RUSTFLAGS}" RUSTFLAGS) find_package_handle_standard_args(Rust REQUIRED_VARS cargo_EXECUTABLE