From 4f6cc35ac2a4ea3db88ae012ea0ef7fe303ab880 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 11 Oct 2021 09:51:39 -0700 Subject: [PATCH] Enable the engine feature on windows (#109) * Enable the engine feature on windows I'm doing things on Windows and that require the `engine` feature to be enabled so that `ENGINE_by_id` is available. This commit succeeds for me locally in a win64 msvc environment. * fix typo This is what happens when you edit via the webui --- src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e027e716..86d793cc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -176,11 +176,16 @@ impl Build { configure.arg("no-seed"); } - if target.contains("musl") || target.contains("windows") { + if target.contains("musl") { // This actually fails to compile on musl (it needs linux/version.h // right now) but we don't actually need this most of the time. - // API of engine.c ld fail in Windows. configure.arg("no-engine"); + } else if target.contains("windows") { + // We can build the engine feature, but the build doesn't seem + // to correctly pick up crypt32.lib functions such as + // `__imp_CertOpenStore` when building the capieng engine. + // Let's disable just capieng. + configure.arg("no-capieng"); } if target.contains("musl") {