infra meson: Add -Dstatic option
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 2 Nov 2021 00:50:08 +0000 (09:50 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Tue, 2 Nov 2021 04:19:19 +0000 (13:19 +0900)
Add an option for use in environments where
the use of static libraries must be enforced.

meson_options.txt
src/loaders/meson.build

index 8d95b2b..76de986 100644 (file)
@@ -47,3 +47,8 @@ option('log',
     type: 'boolean',
     value: false,
     description: 'Enable log message')
+
+option('static',
+    type: 'boolean',
+    value: false,
+    description: 'Enable to use static library(png, jpg)')
index d30f757..a62a91c 100644 (file)
@@ -9,16 +9,24 @@ if all_loaders or get_option('loaders').contains('svg') == true
 endif
 
 if all_loaders or get_option('loaders').contains('png') == true
-    subdir('external_png')
-    if not png_dep.found()
+    if get_option('static') == true
         subdir('png')
+    else
+        subdir('external_png')
+        if not png_dep.found()
+            subdir('png')
+        endif
     endif
 endif
 
 if all_loaders or get_option('loaders').contains('jpg') == true
-    subdir('external_jpg')
-    if not jpg_dep.found()
+    if get_option('static') == true
         subdir('jpg')
+    else
+        subdir('external_jpg')
+        if not jpg_dep.found()
+            subdir('jpg')
+        endif
     endif
 endif