Correction for conan v1.0.0

This commit is contained in:
dimitri 2018-01-11 08:02:19 +01:00 committed by Nigel Stewart
parent ef0e1c4d3a
commit e544f8c12d

View File

@ -69,7 +69,7 @@ class GlewConan(ConanFile):
with tools.environment_append(env.vars): with tools.environment_append(env.vars):
version = min(12, int(self.settings.compiler.version.value)) version = min(12, int(self.settings.compiler.version.value))
version = 10 if version == 11 else version version = 10 if version == 11 else version
cd_build = "cd %s\\%s\\build\\vc%s" % (self.conanfile_directory, self.source_directory, version) cd_build = "cd %s\\%s\\build\\vc%s" % (self.build_folder, self.source_directory, version)
build_command = build_sln_command(self.settings, "glew.sln") build_command = build_sln_command(self.settings, "glew.sln")
vcvars = vcvars_command(self.settings) vcvars = vcvars_command(self.settings)
self.run("%s && %s && %s" % (vcvars, cd_build, build_command.replace("x86", "Win32"))) self.run("%s && %s && %s" % (vcvars, cd_build, build_command.replace("x86", "Win32")))
@ -88,7 +88,7 @@ include(GNUInstallDirs)
cmake.build() cmake.build()
def package(self): def package(self):
find_glew_dir = "%s/build/conan" % self.conanfile_directory if self.version == "master" else "." find_glew_dir = "%s/build/conan" % self.build_folder if self.version == "master" else "."
self.copy("FindGLEW.cmake", ".", find_glew_dir, keep_path=False) self.copy("FindGLEW.cmake", ".", find_glew_dir, keep_path=False)
self.copy("include/*", ".", "%s" % self.source_directory, keep_path=True) self.copy("include/*", ".", "%s" % self.source_directory, keep_path=True)
self.copy("%s/license*" % self.source_directory, dst="licenses", ignore_case=True, keep_path=False) self.copy("%s/license*" % self.source_directory, dst="licenses", ignore_case=True, keep_path=False)