diff --git a/build.rs b/build.rs index 01b94116393cefa53bc41f72bf2c3c8c8c8b378f..9c04e9429c5e1ffef9dc12a18d289e164b15dcf4 100644 --- a/build.rs +++ b/build.rs @@ -39,6 +39,16 @@ fn main() -> Result<(), std::io::Error> { // This is set to allow the use of the library from the build // directory. let content = String::from_utf8(content).unwrap() + .replace("REQUIRES", + if cfg!(feature = "crypto-botan") { + "botan-2" + } else if cfg!(feature = "crypto-nettle") { + "nettle" + } else if cfg!(feature = "crypto-cng") { + "" + } else { + panic!("Don't know dependencies to add to .pc file") + }) .replace("LIBDIR", &build_dir .to_str() diff --git a/pep_engine_sequoia_backend.pc.in b/pep_engine_sequoia_backend.pc.in index de8cd24598638a28f26d0af5e872e81249abc241..8c7cd273fc27c17a746cf5ca1eff491641f11e62 100644 --- a/pep_engine_sequoia_backend.pc.in +++ b/pep_engine_sequoia_backend.pc.in @@ -5,6 +5,6 @@ Name: pEpEngineSequoiaBackend Description: An implementation of the pEp Engine's crypttext interface using Sequoia URL: https://sequoia-pgp.org/ Version: VERSION -Requires: botan-2 +Requires: REQUIRES Cflags: Libs: -L${libdir} -lpep_engine_sequoia_backend