Skip to content

Commit

Permalink
update according to reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Nomalah committed Nov 9, 2022
1 parent e7bfb63 commit 9f6d175
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions recipes/openh264/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from conan import ConanFile
from conans import tools
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file, chdir
from conan.tools.gnu import Autotools, AutotoolsToolchain
Expand All @@ -9,21 +10,8 @@

import os

# Temporary duplication until conan 1.54, at which conan.tools.build.stdcpp_library will replace this.
def _stdcpp_library(conanfile):
libcxx = conanfile.settings.get_safe("compiler.libcxx")
if libcxx in ["libstdc++", "libstdc++11"]:
return "stdc++"
elif libcxx in ["libc++"]:
return "c++"
elif libcxx in ["c++_shared"]:
return "c++_shared"
elif libcxx in ["c++_static"]:
return "c++_static"
return None


required_conan_version = ">=1.52.0"
required_conan_version = ">=1.53.0"


class OpenH264Conan(ConanFile):
Expand Down Expand Up @@ -61,10 +49,7 @@ def config_options(self):

def configure(self):
if self.options.shared:
try:
del self.options.fPIC
except Exception:
pass
self.options.rm_safe("fPIC")

def layout(self):
basic_layout(self, src_folder="src")
Expand Down Expand Up @@ -200,7 +185,7 @@ def package_info(self):
self.cpp_info.system_libs.extend(["m", "pthread"])
if self.settings.os == "Android":
self.cpp_info.system_libs.append("m")
# switch to conan.tools.build.stdcpp_library in conan 1.54
libcxx = _stdcpp_library(self)
# TODO: switch to conan.tools.build.stdcpp_library in conan 1.54
libcxx = tools.stdcpp_library(self)
if libcxx:
self.cpp_info.system_libs.append(libcxx)

0 comments on commit 9f6d175

Please sign in to comment.