Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Fixed MSVC build.
Browse files Browse the repository at this point in the history
cd qt5 was reset after call'ing vcvarsall.bat on VS 2017.
  • Loading branch information
bilke committed Oct 9, 2017
1 parent 076178f commit bf9187a
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,28 +186,22 @@ def _build_msvc(self, args):

env_build = VisualStudioBuildEnvironment(self)
env.update(env_build.vars)
vcvars = tools.vcvars_command(self.settings)

# Workaround for conan-io/conan#1408
for name, value in env.items():
if not value:
del env[name]
with tools.environment_append(env):
vcvars = tools.vcvars_command(self.settings)

args += ["-opengl %s" % self.options.opengl]
if self.options.openssl == "no":
args += ["-no-openssl"]
elif self.options.openssl == "yes":
args += ["-openssl"]
else:
args += ["-openssl-linked"]
args += ["-opengl %s" % self.options.opengl]
if self.options.openssl == "no":
args += ["-no-openssl"]
elif self.options.openssl == "yes":
args += ["-openssl"]
else:
args += ["-openssl-linked"]

self.run("cd %s && %s && set" % (self.source_dir, vcvars))
self.run("cd %s && %s && configure %s"
% (self.source_dir, vcvars, " ".join(args)))
self.run("cd %s && %s && %s %s"
% (self.source_dir, vcvars, build_command, " ".join(build_args)))
self.run("cd %s && %s && %s install" % (self.source_dir, vcvars, build_command))
self.run("%s && cd %s && set" % (vcvars, self.source_dir))
self.run("%s && cd %s && configure %s"
% (vcvars, self.source_dir, " ".join(args)))
self.run("%s && cd %s && %s %s"
% (vcvars, self.source_dir, build_command, " ".join(build_args)))
self.run("%s && cd %s && %s install" % (vcvars, self.source_dir, build_command))

def _build_mingw(self, args):
env_build = AutoToolsBuildEnvironment(self)
Expand Down

0 comments on commit bf9187a

Please sign in to comment.