diff --git a/rust_icu_release/src/lib.rs b/rust_icu_release/src/lib.rs index d2a30e7e..3e8ff8d1 100644 --- a/rust_icu_release/src/lib.rs +++ b/rust_icu_release/src/lib.rs @@ -116,9 +116,17 @@ impl ICUConfig { /// Obtains the needed flags for the C++ compiler. pub fn cppflags(&mut self) -> Result { - self.rep + let cflags = self + .rep .run(&["--cflags", "icu-i18n"]) - .context("while getting the cpp flags") + .context("while getting the cpp flags")?; + + let defs = self + .rep + .run(&["--variable=DEFS", "icu-i18n"]) + .context("while getting the DEFS variable")?; + + Ok([cflags, defs].join(" ")) } /// Obtains the major-minor version number for the library. Returns a string like `64.2`.