bu5hm4n pushed a commit to branch feature/meson.

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

commit a28f8e36d44df2193e1316c9d0ed7622aa0925ad
Author: Marcel Hollerbach <[email protected]>
Date:   Wed Dec 27 18:26:06 2017 +0000

    meson: ecore_con is added!
---
 meson.build                     |  4 +---
 src/bin/ecore_con/meson.build   |  5 +++++
 src/lib/ecore_con/meson.build   | 41 +++++++++++++++++++++++++++++++++--------
 src/tests/ecore_con/meson.build | 20 ++++++++++++++++++++
 src/tests/meson.build           |  1 +
 5 files changed, 60 insertions(+), 11 deletions(-)

diff --git a/meson.build b/meson.build
index 1fc1900012..d8ef8cf1be 100644
--- a/meson.build
+++ b/meson.build
@@ -91,7 +91,7 @@ subprojects = [
 ['ecore' ,  true, false, false, false, []], #ecores modules depend on eldbus
 ['ecore_audio' , false,  true, false, false, []],
 ['ecore_avahi' , false,  true, false, false, []],
-['ecore_con' , false, true, false, false, []],
+['ecore_con' , false,  true,  true, false, ['http-parser']],
 ['ecore_file' , false,  true, false, false, []],
 ]
 
@@ -101,8 +101,6 @@ config_dir += include_directories('.')
 
 #we have to do that first, eina modules are required by eina
 #the other modules require theire package
-
-subdir(join_paths('src', 'static_libs', 'http-parser'))
 subdir(join_paths(local_module, 'eina'))
 
 foreach package : subprojects
diff --git a/src/bin/ecore_con/meson.build b/src/bin/ecore_con/meson.build
new file mode 100644
index 0000000000..59a4f6fccd
--- /dev/null
+++ b/src/bin/ecore_con/meson.build
@@ -0,0 +1,5 @@
+executable('efl_net_proxy_helper',
+       'efl_net_proxy_helper.c',
+       dependencies : [ecore_con],
+       install : true
+)
\ No newline at end of file
diff --git a/src/lib/ecore_con/meson.build b/src/lib/ecore_con/meson.build
index 2020e0cd02..7ec0d03a1d 100644
--- a/src/lib/ecore_con/meson.build
+++ b/src/lib/ecore_con/meson.build
@@ -1,6 +1,26 @@
-
 ecore_con_deps = []
 
+pub_legacy_eo_files = [
+  'ecore_con_eet_base.eo',
+  'ecore_con_eet_server_obj.eo',
+  'ecore_con_eet_client_obj.eo'
+]
+
+pub_eo_file_target = []
+foreach eo_file : pub_legacy_eo_files
+  pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
+    input : eo_file,
+    output : [eo_file + '.h', eo_file + '.legacy.h',],
+    install : true,
+    install_dir : dir_package_include,
+    command : [eolian_gen, '-I', meson.current_source_dir(), 
eolian_include_directories,
+                           '-o', 'h:' + join_paths(meson.current_build_dir(), 
eo_file + '.h'),
+                           '-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c'),
+                           '-o', 'l:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.h'),
+                           '-gchl', '@INPUT@'])
+
+endforeach
+
 pub_eo_files = [
   'efl_net_socket.eo',
   'efl_net_socket_simple.eo',
@@ -29,9 +49,6 @@ pub_eo_files = [
   'efl_net_control.eo',
   'efl_net_session.eo',
   'efl_net_ip_address.eo',
-  'ecore_con_eet_base.eo',
-  'ecore_con_eet_server_obj.eo',
-  'ecore_con_eet_client_obj.eo'
 ]
 
 if target_machine.system() == 'windows'
@@ -139,15 +156,15 @@ else
   ]
 endif
 
-if get_option('network-backend') == 'connman'
-  ecore_con_src = [
+if get_option('network-backend') == 'none'
+  ecore_con_src += [
     'efl_net_control_access_point-none.c',
     'efl_net_control_technology-none.c',
     'efl_net_control-none.c',
     'efl_net_session-none.c'
   ]
 else 
-  ecore_con_src = [
+  ecore_con_src += [
     'efl_net-connman.h',
     'efl_net-connman.c',
     'efl_net_control_access_point-connman.c',
@@ -155,11 +172,19 @@ else
     'efl_net_control-connman.c',
     'efl_net_session-connman.c'
   ]
+  ecore_con_deps += eldbus
+endif
+
+
+if (get_option('crypto') == 'gnutls')
+  ecore_con_deps += gnutls
+elif (get_option('crypto') == 'openssl')
+  ecore_con_deps += openssl
 endif
 
 ecore_con_lib = library('ecore_con',
     ecore_con_src, pub_eo_file_target,
-    dependencies: [ecore, ecore_con_deps, http_parser],
+    dependencies: [ecore, ecore_con_deps, http_parser, eldbus, eet, systemd, 
dl],
     include_directories : config_dir,
     install: true,
 )
diff --git a/src/tests/ecore_con/meson.build b/src/tests/ecore_con/meson.build
new file mode 100644
index 0000000000..37c703a2d9
--- /dev/null
+++ b/src/tests/ecore_con/meson.build
@@ -0,0 +1,20 @@
+ecore_con_suite_src = [
+  'ecore_con_suite.c',
+  'ecore_con_test_ecore_con.c',
+  'ecore_con_test_ecore_con_url.c',
+  'ecore_con_test_ecore_con_eet.c',
+  'ecore_con_test_efl_net_ip_address.c',
+  'ecore_con_suite.h'
+]
+
+ecore_con_suite = executable('ecore_con_suite',
+  ecore_con_suite_src,
+  dependencies: [ecore_con, eet, ecore, check],
+  c_args : [
+  '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
+  '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
+)
+
+test('ecore_con-suite', ecore_con_suite,
+       is_parallel: true,
+)
\ No newline at end of file
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 76f36f82d8..1fba6c8595 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -7,3 +7,4 @@ subdir('emile')
 subdir('eet')
 #subdir('ecore')
 subdir('eldbus')
+subdir('ecore_con')
\ No newline at end of file

-- 


Reply via email to