diff --git a/cmake/FindRust.cmake b/cmake/FindRust.cmake index ffa86e33f1..2be2cd1fec 100644 --- a/cmake/FindRust.cmake +++ b/cmake/FindRust.cmake @@ -486,7 +486,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