From b55d73ba31dfb32c16187f4c3f91fdf8bab1a05a Mon Sep 17 00:00:00 2001 From: Olivier Sechet Date: Tue, 4 Jul 2017 21:18:19 +0200 Subject: [PATCH] Testing/5.8.0 (#27) * Add openssl option (#26) * Ignore MT runtime to make appveyor builds faster --- appveyor.yml | 24 ++++-------------------- build.py | 4 ++++ conanfile.py | 25 ++++++++++++++++++++++--- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a5895ca..0895b7f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,7 +16,7 @@ environment: CONAN_CURRENT_PAGE: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 CONAN_VISUAL_VERSIONS: 12 - CONAN_TOTAL_PAGES: 4 + CONAN_TOTAL_PAGES: 2 CONAN_CURRENT_PAGE: 1 - MINGW_CONFIGURATIONS: "5.4@x86_64@seh@posix" @@ -25,32 +25,16 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 CONAN_VISUAL_VERSIONS: 12 - CONAN_TOTAL_PAGES: 4 + CONAN_TOTAL_PAGES: 2 CONAN_CURRENT_PAGE: 2 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - CONAN_VISUAL_VERSIONS: 12 - CONAN_TOTAL_PAGES: 4 - CONAN_CURRENT_PAGE: 3 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - CONAN_VISUAL_VERSIONS: 12 - CONAN_TOTAL_PAGES: 4 - CONAN_CURRENT_PAGE: 4 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 CONAN_VISUAL_VERSIONS: 14 - CONAN_TOTAL_PAGES: 4 + CONAN_TOTAL_PAGES: 2 CONAN_CURRENT_PAGE: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 CONAN_VISUAL_VERSIONS: 14 - CONAN_TOTAL_PAGES: 4 + CONAN_TOTAL_PAGES: 2 CONAN_CURRENT_PAGE: 2 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - CONAN_VISUAL_VERSIONS: 14 - CONAN_TOTAL_PAGES: 4 - CONAN_CURRENT_PAGE: 3 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - CONAN_VISUAL_VERSIONS: 14 - CONAN_TOTAL_PAGES: 4 - CONAN_CURRENT_PAGE: 4 install: - set PATH=%PATH%;%PYTHON%/Scripts/ diff --git a/build.py b/build.py index e14809a..d6a4c0d 100644 --- a/build.py +++ b/build.py @@ -10,6 +10,10 @@ def main(): builder.add_common_builds() filtered_builds = [] for settings, options, env_vars, build_requires in builder.builds: + if settings["compiler"] == "Visual Studio": + if settings["compiler.runtime"] == "MT" or settings["compiler.runtime"] == "MTd": + # Ignore MT runtime + continue if settings["arch"] != "x86_64": continue diff --git a/conanfile.py b/conanfile.py index 74eb19f..caa0d67 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,8 +1,8 @@ import os +from distutils.spawn import find_executable from conans import AutoToolsBuildEnvironment, ConanFile, tools, VisualStudioBuildEnvironment from conans.tools import cpu_count, os_info, SystemPackageTool -from distutils.spawn import find_executable def which(program): """ @@ -48,9 +48,10 @@ class QtConan(ConanFile): "tools": [True, False], "webengine": [True, False], "websockets": [True, False], - "xmlpatterns": [True, False] + "xmlpatterns": [True, False], + "openssl": ["no", "yes", "linked"] } - default_options = "shared=True", "opengl=desktop", "canvas3d=False", "gamepad=False", "graphicaleffects=False", "imageformats=False", "location=False", "serialport=False", "svg=False", "tools=False", "webengine=False", "websockets=False", "xmlpatterns=False" + default_options = "shared=True", "opengl=desktop", "canvas3d=False", "gamepad=False", "graphicaleffects=False", "imageformats=False", "location=False", "serialport=False", "svg=False", "tools=False", "webengine=False", "websockets=False", "xmlpatterns=False", "openssl=no" url = "http://github.com/osechet/conan-qt" license = "http://doc.qt.io/qt-5/lgpl.html" short_paths = True @@ -78,6 +79,18 @@ def system_requirements(self): installer.update() # Update the package database installer.install(" ".join(pack_names)) # Install the package + def config_options(self): + if self.settings.os != "Windows": + del self.options.opengl + del self.options.openssl + + def requirements(self): + if self.settings.os == "Windows": + if self.options.openssl == "yes": + self.requires("OpenSSL/1.0.2l@conan/stable", dev=True) + elif self.options.openssl == "linked": + self.requires("OpenSSL/1.0.2l@conan/stable") + def source(self): submodules = ["qtbase"] @@ -182,6 +195,12 @@ def _build_msvc(self, args): 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"] self.run("cd %s && %s && set" % (self.source_dir, vcvars)) self.run("cd %s && %s && configure %s"