From 152c6dfa6dc659b32bf6523fdb0f93fe74c355e3 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 21 Jan 2022 15:45:45 +0530 Subject: taglib.recipe: Add support for building with MSVC Part-of: --- recipes/taglib.recipe | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'recipes') diff --git a/recipes/taglib.recipe b/recipes/taglib.recipe index 72b8739b..ad25ff02 100644 --- a/recipes/taglib.recipe +++ b/recipes/taglib.recipe @@ -13,11 +13,19 @@ class Recipe(recipe.Recipe): tarball_checksum = 'b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b' # either LGPLv2.1 or MPLv1.1 licenses = [License.LGPLv2_1Plus] - configure_options = '-DWITH_MP4=ON -DWITH_ASF=ON -DBUILD_SHARED_LIBS=1 -DBUILD_STATIC_LIBS=1 -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE' + btype = BuildType.CMAKE - patches = ['taglib/0001-Link-with-correct-STL-on-Android.patch', - 'taglib/0002-Build-a-static-and-non-static-version.patch', - ] + configure_options = '-DWITH_MP4=ON \ + -DWITH_ASF=ON \ + -DBUILD_SHARED_LIBS=1 \ + -DBUILD_STATIC_LIBS=1 \ + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE' + can_msvc = True + + patches = [ + 'taglib/0001-Link-with-correct-STL-on-Android.patch', + 'taglib/0002-Build-a-static-and-non-static-version.patch', + ] files_libs = ['libtag'] files_devel = ['include/taglib', 'lib/pkgconfig/taglib.pc'] @@ -33,8 +41,12 @@ class Recipe(recipe.Recipe): async def install(self): await super(recipe.Recipe, self).install() + if self.using_msvc(): + stlib_name = 'tag_static.lib' + else: + stlib_name = 'libtag_static.a' shutil.move( - os.path.join(self.config.prefix, 'lib', 'libtag_static.a'), + os.path.join(self.config.prefix, 'lib', stlib_name), os.path.join(self.config.prefix, 'lib', 'libtag.a')) def post_install(self): -- cgit v1.2.3