aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib.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/mesonlib.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/mesonlib.py')
-rw-r--r--mesonbuild/mesonlib.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index 0afc21b..25e15e4 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -1274,3 +1274,13 @@ def relpath(path, start):
return os.path.relpath(path, start)
except ValueError:
return path
+
+
+class LibType(Enum):
+
+ """Enumeration for library types."""
+
+ SHARED = 0
+ STATIC = 1
+ PREFER_SHARED = 2
+ PREFER_STATIC = 3