From a3089978e1ab380557db72556ae161af8891c5da Mon Sep 17 00:00:00 2001 From: Leila Lali Date: Mon, 10 Oct 2016 08:47:35 -0700 Subject: [PATCH] =?UTF-8?q?Setting=20the=20rpath=20for=20System.Security.C?= =?UTF-8?q?ryptography.Native.dylib=20at=20bu=E2=80=A6=20(#84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Setting the rpath for System.Security.Cryptography.Native.dylib at build time for mac --- build.cake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.cake b/build.cake index 20276ba5..bf755454 100644 --- a/build.cake +++ b/build.cake @@ -322,7 +322,13 @@ Task("OnlyPublish") publishArguments = $"{publishArguments} --output \"{outputFolder}\" \"{projectFolder}\""; Run(dotnetcli, publishArguments) .ExceptionOnError($"Failed to publish {project} / {framework}"); - + //Setting the rpath for System.Security.Cryptography.Native.dylib library + //Only required for mac. We're assuming the openssl is installed in /usr/local/opt/openssl + //If that's not the case user has to run the command manually + if (runtime.Contains("osx")) + { + Run("install_name_tool", "-add_rpath /usr/local/opt/openssl/lib " + outputFolder + "/System.Security.Cryptography.Native.dylib"); + } if (requireArchive) { Package(runtime, framework, outputFolder, packageFolder, buildPlan.MainProject.ToLower());