bu5hm4n pushed a commit to branch feature/meson.

http://git.enlightenment.org/core/efl.git/commit/?id=03868e2244d8704ca2e538d19b1803c495a0c413

commit 03868e2244d8704ca2e538d19b1803c495a0c413
Author: Marcel Hollerbach <[email protected]>
Date:   Thu Dec 28 10:29:05 2017 +0000

    meson: support disabling of packages
    
    this is a bit weird, you can disable building of eina ... :)
    Anyway macos users for example can disable the packages they need ...
---
 meson.build       |  42 +++++++++++++--------
 meson_options.txt | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 134 insertions(+), 16 deletions(-)

diff --git a/meson.build b/meson.build
index f835560070..121b2306fc 100644
--- a/meson.build
+++ b/meson.build
@@ -115,24 +115,34 @@ foreach package : subprojects
   package_name = package[0]
   package_version_name = package_name + '-' + version_major
 
-  dir_package_include = join_paths(dir_include, package_version_name)
-
-  foreach static_lib : package[5]
-    subdir(join_paths('src', 'static_libs', static_lib))
-  endforeach
+  if get_option(package_name)
+
+    dir_package_include = join_paths(dir_include, package_version_name)
+
+    foreach static_lib : package[5]
+      subdir(join_paths('src', 'static_libs', static_lib))
+    endforeach
+
+    if (package[2])
+       subdir(join_paths(local_lib, package_name))
+    endif
+    if (package[1])
+       subdir(join_paths(local_module, package_name))
+    endif
+    if (package[3])
+       subdir(join_paths(local_bin, package_name))
+    endif
+    if (package[4])
+       subdir(join_paths(local_benchmark, package_name))
+    endif
+    set_variable('build_'+package_name, true)
+  else
+    set_variable('build_'+package_name, false)
+    
+    message(package_name+' disabled!')
 
-  if (package[2])
-     subdir(join_paths(local_lib, package_name))
-  endif
-  if (package[1])
-     subdir(join_paths(local_module, package_name))
-  endif
-  if (package[3])
-     subdir(join_paths(local_bin, package_name))
-  endif
-  if (package[4])
-     subdir(join_paths(local_benchmark, package_name))
   endif
+
 endforeach
 
 if get_option('build-tests')
diff --git a/meson_options.txt b/meson_options.txt
index ba5f7fd8d4..0e2cf93db6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,111 @@
+option('eina',
+  type : 'boolean',
+  value : true,
+  description : 'build eina'
+)
+
+option('eo',
+  type : 'boolean',
+  value : true,
+  description : 'build eo'
+)
+
+option('eolian',
+  type : 'boolean',
+  value : true,
+  description : 'build eolian'
+)
+
+option('eet',
+  type : 'boolean',
+  value : true,
+  description : 'build eet'
+)
+
+option('emile',
+  type : 'boolean',
+  value : true,
+  description : 'build emile'
+)
+
+option('efl',
+  type : 'boolean',
+  value : true,
+  description : 'build efl'
+)
+
+option('ecore',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore'
+)
+
+option('eldbus',
+  type : 'boolean',
+  value : true,
+  description : 'build eldbus'
+)
+
+option('ecore_audio',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_audio'
+)
+
+option('ecore_con',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_con'
+)
+
+option('ecore_file',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_file'
+)
+
+option('ecore_avahi',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_avahi'
+)
+
+option('ecore_input',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_input'
+)
+
+option('ecore_x',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_x'
+)
+
+option('ecore_fb',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_fb'
+)
+
+option('ecore_buffer',
+  type : 'boolean',
+  value : false,
+  description : 'build ecore_buffer'
+)
+
+option('ecore_wl2',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_wl2'
+)
+
+option('ecore_ipc',
+  type : 'boolean',
+  value : true,
+  description : 'build ecore_ipc'
+)
+
 option('build-id',
   type : 'string',
   value : 'none',

-- 


Reply via email to