Skip to content

Commit

Permalink
corrade: get rid of vs_ide_version()
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Aug 31, 2023
1 parent f02ef0b commit 45e6910
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions recipes/corrade/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conan.tools.microsoft import is_msvc
from conan.tools.microsoft.visual import vs_ide_version, check_min_vs
from conan.tools.microsoft.visual import check_min_vs

required_conan_version = ">=1.47.0"

Expand Down Expand Up @@ -91,9 +91,12 @@ def generate(self):
tc.variables["LIB_SUFFIX"] = ""

if is_msvc(self):
tc.variables["MSVC2015_COMPATIBILITY"] = vs_ide_version(self) == "14"
tc.variables["MSVC2017_COMPATIBILITY"] = vs_ide_version(self) == "15"
tc.variables["MSVC2019_COMPATIBILITY"] = vs_ide_version(self) in ("16", "17")
if check_min_vs(self, 193, raise_invalid=False):
tc.variables["MSVC2019_COMPATIBILITY"] = True
elif check_min_vs(self, 192, raise_invalid=False):
tc.variables["MSVC2017_COMPATIBILITY"] = True
elif check_min_vs(self, 191, raise_invalid=False):
tc.variables["MSVC2015_COMPATIBILITY"] = True

tc.generate()
tc = CMakeDeps(self)
Expand Down

0 comments on commit 45e6910

Please sign in to comment.