aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-03-18 14:23:06 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2019-03-20 18:45:56 +0200
commitac627bcea723b12e17822c18cccc9dbdeaee8b8f (patch)
tree66999769a73d0f923389f1d2ddec898421a204a1 /mesonbuild/dependencies/base.py
parent44dd5535f056922294867bac2eb07b57f21bede6 (diff)
downloadmeson-ac627bcea723b12e17822c18cccc9dbdeaee8b8f.zip
meson-ac627bcea723b12e17822c18cccc9dbdeaee8b8f.tar.gz
meson-ac627bcea723b12e17822c18cccc9dbdeaee8b8f.tar.bz2
replace library type strings with an enum
This patch creates an enum for selecting libtype as static, shared, prefer-static, or prefer-shared. This also renames 'static-shared' with 'prefer_static' and 'shared-static' with 'prefer_shared'. This is just a refactor with no behavioral changes or user facing changes.
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 2ba150b..995a980 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -36,7 +36,7 @@ from ..compilers import clib_langs
from ..environment import BinaryTable, Environment, MachineInfo
from ..mesonlib import MachineChoice, MesonException, OrderedSet, PerMachine
from ..mesonlib import Popen_safe, version_compare_many, version_compare, listify
-from ..mesonlib import Version
+from ..mesonlib import Version, LibType
# These must be defined in this file to avoid cyclical references.
packages = {}
@@ -703,7 +703,7 @@ class PkgConfigDependency(ExternalDependency):
libs_found = OrderedSet()
# Track not-found libraries to know whether to add library paths
libs_notfound = []
- libtype = 'static' if self.static else 'shared-static'
+ libtype = LibType.STATIC if self.static else LibType.PREFER_SHARED
# Generate link arguments for this library
link_args = []
for lib in full_args: