diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-07-04 15:39:03 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-07-28 01:33:46 -0400 |
commit | 276fe408affa75749aa7ce024738326d659991f6 (patch) | |
tree | 1e008de64f9a148da81239e84bea5afb60374159 /mesonbuild/dependencies/pkgconfig.py | |
parent | 23ea9feee3f94673c0042527dcd7e98013f1651a (diff) | |
download | meson-276fe408affa75749aa7ce024738326d659991f6.zip meson-276fe408affa75749aa7ce024738326d659991f6.tar.gz meson-276fe408affa75749aa7ce024738326d659991f6.tar.bz2 |
dependencies: make the preferred LibType available to any ExternalDependency
Just like we automatically provide some reusable glue for self.static,
provide it here too. It seems plausibly like something people would
commonly want.
Diffstat (limited to 'mesonbuild/dependencies/pkgconfig.py')
-rw-r--r-- | mesonbuild/dependencies/pkgconfig.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py index 28a3f74..9786918 100644 --- a/mesonbuild/dependencies/pkgconfig.py +++ b/mesonbuild/dependencies/pkgconfig.py @@ -13,7 +13,7 @@ # limitations under the License. from .base import ExternalDependency, DependencyException, sort_libpaths, DependencyTypeName -from ..mesonlib import LibType, MachineChoice, OptionKey, OrderedSet, PerMachine, Popen_safe +from ..mesonlib import MachineChoice, OptionKey, OrderedSet, PerMachine, Popen_safe from ..programs import find_external_program, ExternalProgram from .. import mlog from pathlib import PurePath @@ -267,7 +267,6 @@ class PkgConfigDependency(ExternalDependency): libs_found: OrderedSet[str] = OrderedSet() # Track not-found libraries to know whether to add library paths libs_notfound = [] - libtype = LibType.STATIC if self.static else LibType.PREFER_SHARED # Generate link arguments for this library link_args = [] for lib in full_args: @@ -283,7 +282,7 @@ class PkgConfigDependency(ExternalDependency): continue if self.clib_compiler: args = self.clib_compiler.find_library(lib[2:], self.env, - libpaths, libtype) + libpaths, self.libtype) # If the project only uses a non-clib language such as D, Rust, # C#, Python, etc, all we can do is limp along by adding the # arguments as-is and then adding the libpaths at the end. |