Use #[cfg(feature=...)] instead of env-var

This commit is contained in:
dbr 2021-06-11 00:34:03 +10:00
parent fca87575fd
commit a36fb757fd

View File

@ -49,7 +49,8 @@ fn main() -> io::Result<()> {
}
// Freetype font rasterizer feature
if std::env::var_os("CARGO_FEATURE_FREETYPE").is_some() {
#[cfg(feature = "feature")]
{
let freetype = pkg_config::Config::new().find("freetype2").unwrap();
for include in freetype.include_paths.iter() {
build.include(include);