Skip to content

Commit

Permalink
openh264: fix check for visual studio on Windows (conan 2.0) (#16090)
Browse files Browse the repository at this point in the history
Co-authored-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
jcar87 and uilianries committed Feb 20, 2023
1 parent fef8fc7 commit 8802daf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions recipes/openh264/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
from conan.tools.gnu import Autotools, AutotoolsToolchain
from conan.tools.apple import is_apple_os, fix_apple_shared_install_name
from conan.tools.layout import basic_layout
from conan.tools.scm import Version
from conan.tools.microsoft import is_msvc, unix_path, msvc_runtime_flag
from conan.tools.microsoft import check_min_vs, is_msvc, unix_path, msvc_runtime_flag

import os


required_conan_version = ">=1.54.0"
required_conan_version = ">=1.57.0"


class OpenH264Conan(ConanFile):
Expand Down Expand Up @@ -150,7 +149,8 @@ def generate(self):

if is_msvc(self):
tc.extra_cxxflags.append("-nologo")
if not (self.settings.compiler == "Visual Studio" and Version(self.settings.compiler.version) < "12"):
if check_min_vs(self, "180", raise_invalid=False):
# https://github.com/conan-io/conan/issues/6514
tc.extra_cxxflags.append("-FS")
# not needed during and after 2.3.1
elif self.settings.compiler in ("apple-clang",):
Expand Down

0 comments on commit 8802daf

Please sign in to comment.