From 3cf0095f3568e8cc6f64b3299501bcb267d302d6 Mon Sep 17 00:00:00 2001 From: Dmitry Bely Date: Wed, 5 May 2021 17:05:26 +0300 Subject: [PATCH] openssl: closes #4740 --- recipes/openssl/1.x.x/conanfile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index b8749e55a8500..dff526cb4039f 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -635,6 +635,13 @@ def _make(self): if self._use_nmake and self._full_version >= "1.1.0": self._replace_runtime_in_file(os.path.join("Configurations", "10-main.conf")) + if self._use_nmake: + # Windows: when cmake generates its cache, it populates some environment variables as well. + # If cmake also initiates openssl build, their values (containing spaces and forward slashes) + # break nmake (don't know about mingw make). So we fix them + for v in ['CC', 'CXX', 'RC']: + if v in os.environ and not '"' in os.environ[v]: + os.environ[v] = '"' + os.environ[v].replace('/', '\\') + '"' self.run('{perl} ./Configure {args}'.format(perl=self._perl, args=args), win_bash=self._win_bash) self._patch_install_name()