model { components { Crypto(NativeLibrarySpec) { sources { rc { source { srcDir '..' include 'DLLVersion.rc' } } cpp { source { srcDir 'src' include '**/*.cpp' } exportedHeaders { srcDir 'include' } lib library: 'ssl' lib library: 'crypto' lib project: ':Foundation', library: 'Foundation' } } } } binaries { all { if (toolChain in VisualCpp) { linker.args "ws2_32.lib" linker.args "iphlpapi.lib" } if (toolChain in Gcc) { // linker.args "-lssl" // linker.args "-lcrypto" } } withType(SharedLibraryBinarySpec) { if (toolChain in VisualCpp) { cppCompiler.define "Crypto_EXPORTS" } } } } task poco { dependsOn "assemble" }