From bb7f014765c7fc9a8a8da6c097ee6642a5a8fdc5 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 21 Dec 2022 11:21:37 +0100 Subject: [PATCH] Use latest Windows SDK available Adopt a workaround provided by @jcar87, which is a temporary hotfix until having https://github.com/conan-io/conan-center-index/issues/13159 fixed. Signed-off-by: Uilian Ries --- recipes/jasper/all/conanfile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/jasper/all/conanfile.py b/recipes/jasper/all/conanfile.py index 56fa455cf3d09..b15c3ca21b88c 100644 --- a/recipes/jasper/all/conanfile.py +++ b/recipes/jasper/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, save +from conan.tools.microsoft import is_msvc import os import textwrap @@ -69,6 +70,12 @@ def generate(self): tc = CMakeDeps(self) tc.generate() + # TODO: Remove after fixing https://github.com/conan-io/conan-center-index/issues/13159 + # C3I workaround to force CMake to choose the highest version of + # the windows SDK available in the system + if is_msvc(self) and not self.conf.get("tools.cmake.cmaketoolchain:system_version"): + tc.variables["CMAKE_SYSTEM_VERSION"] = "10.0" + def build(self): apply_conandata_patches(self) cmake = CMake(self)