Skip to content

Commit

Permalink
refactor(conan-freetype): fix optionals builds
Browse files Browse the repository at this point in the history
  • Loading branch information
PamplemousseMR committed May 24, 2020
1 parent fd99954 commit 88bc74e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions conan-freetype/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,21 @@ def configure(self):
del self.settings.compiler.cppstd

def requirements(self):
if self.options.with_zlib:
self.requires.add("zlib/1.2.11@{0}/{1}".format(self.user, self.channel))
if self.options.with_bzip2:
self.requires.add("bzip2/1.0.8@{0}/{1}".format(self.user, self.channel))
if self.options.with_png:
self.requires.add("libpng/1.6.37@{0}/{1}".format(self.user, self.channel))

if self.options.with_harfbuzz:
self.requires.add("harfbuzz/2.6.2@{0}/{1}".format(self.user, self.channel))

if self.options.with_png:
self.requires.add("libpng/1.6.37@{0}/{1}".format(self.user, self.channel))
if not self.options.with_zlib:
self.output.warn("libpng needs zlib, with_png is sets to True.")
self.options.with_zlib = True

if self.options.with_zlib:
self.requires.add("zlib/1.2.11@{0}/{1}".format(self.user, self.channel))

def source(self):
tools.get("{0}/{1}-{2}.tar.gz".format(self.homepage, self.name, self.version),
sha256="3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110")
Expand Down

0 comments on commit 88bc74e

Please sign in to comment.