efl/src/lib/ecore/meson.build

234 lines
6.1 KiB
Meson
Raw Normal View History

ecore_deps = []
ecore_pub_deps = [eina, eo, efl]
ecore_ext_deps = [intl, m, buildsystem]
if sys_sun == true
ecore_deps += [malloc]
endif
pub_legacy_eo_files = [
'ecore_event_message.eo',
'ecore_event_message_handler.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'],
depfile : eo_file + '.d',
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', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
ecore: Rename EAPI macro to ECORE_API in Ecore library Patch from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass ```__attribute__ ((visibility ("default")))``` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as ```__atttribute__((visibility("default")))```. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why EAPI is the only solution that worked for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
2020-09-20 06:23:26 -07:00
'-e', 'ECORE_API',
'-gchd', '@INPUT@'])
endforeach
pub_eo_files = [
'efl_app.eo',
'efl_loop.eo',
'efl_loop_consumer.eo',
'efl_loop_fd.eo',
'efl_loop_handler.eo',
'efl_loop_message.eo',
'efl_loop_message_handler.eo',
'efl_exe.eo',
'efl_thread.eo',
'efl_threadio.eo',
'efl_appthread.eo',
'efl_task.eo',
'efl_io_closer_fd.eo',
'efl_io_positioner_fd.eo',
'efl_io_reader_fd.eo',
'efl_io_sizer_fd.eo',
'efl_io_writer_fd.eo',
'efl_io_stdin.eo',
'efl_io_stdout.eo',
'efl_io_stderr.eo',
'efl_io_file.eo',
'efl_io_copier.eo',
'efl_io_buffered_stream.eo',
'efl_linear_interpolator.eo',
'efl_accelerate_interpolator.eo',
'efl_decelerate_interpolator.eo',
'efl_sinusoidal_interpolator.eo',
'efl_divisor_interpolator.eo',
'efl_bounce_interpolator.eo',
'efl_spring_interpolator.eo',
'efl_cubic_bezier_interpolator.eo',
'efl_loop_message_future_handler.eo',
'efl_loop_message_future.eo',
efl_model : rename all efl_model based classes. Summary: As the result of discussion in T7458, we need to rename all efl_model based classes with efl_XXX_Model sequence. I've run few vote for this, see V42, V43 few classes are totally renamed as our consideration of misnaming. | Efl.Model_Loop | Efl.Loop_Model | | Efl.Model_Item | Efl.Generic_Model | | Efl.Model_Container | Efl.Container_Model | | Efl.Model_Container_Item | Efl.Container_Model_Item | | Efl.Model_Composite | Efl.Composite_Model | | Efl.Model_Composite_Boolean | Efl.Boolean_Model | | Efl.Model_Composite_Boolean_Chlidren | Efl.Boolean_Model_Item | | Efl.Model_Composite_Selection | Efl.Select_Model | | Efl.Model_Composite_Selection_Chlidren | Efl.Select_Model_Item | | Efl.Model_View | Efl.View_Model | | Eio.Model | Efl.Io.Model | | Efl.Ui.Model_State | Efl.Ui.State_Model | | Efl.Ui.Model_Size | Efl.Ui.Size_Model | | Efl.Ui.Model_Exact | Efl.Ui.Exact_Model | | Efl.Ui.Model_Average | Efl.Ui.Average_Model | | Efl.Ui.Model_Homogeneous | Efl.Ui.Homogeneous_Model | I worried about Efl.Io.Model changes, cause it is widely used, but as I tested, there is no issue found yet. Eldbus.Model also may can changed Efl.Dbus.Model, but I cannot found any class who using Efl.Dbus namespace, so I left it future work. Test Plan: Run the Make Test, it works well except Efl test about selection. there are class inheritance problem exist in select_model, I reported it and will fix it in another patch. Reviewers: cedric, felipealmeida, woohyun, Hermet Reviewed By: cedric Subscribers: lauromoura Tags: #efl, #do_not_merge Differential Revision: https://phab.enlightenment.org/D7533
2019-01-30 20:35:34 -08:00
'efl_loop_model.eo',
'efl_generic_model.eo',
'efl_container_model.eo',
'efl_boolean_model.eo',
'efl_composite_model.eo',
'efl_core_env.eo',
'efl_core_proc_env.eo',
'efl_core_command_line.eo',
'efl_loop_timer.eo',
'efl_filter_model.eo',
]
foreach eo_file : pub_eo_files
pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
input : eo_file,
output : [eo_file + '.h'],
depfile : eo_file + '.d',
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', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
ecore: Rename EAPI macro to ECORE_API in Ecore library Patch from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass ```__attribute__ ((visibility ("default")))``` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as ```__atttribute__((visibility("default")))```. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why EAPI is the only solution that worked for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
2020-09-20 06:23:26 -07:00
'-e', 'ECORE_API',
'-gchd', '@INPUT@'])
endforeach
pub_eo_types_files = []
eolian_include_directories += ['-I', meson.current_source_dir()]
ecore_header_src = [
'Ecore.h',
'Ecore_Common.h',
'Ecore_Legacy.h',
'Ecore_Eo.h',
'Efl_Core.h',
'efl_general.h',
'Ecore_Getopt.h',
'ecore_exe_eo.h',
ecore: Rename EAPI macro to ECORE_API in Ecore library Patch from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass ```__attribute__ ((visibility ("default")))``` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as ```__atttribute__((visibility("default")))```. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why EAPI is the only solution that worked for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
2020-09-20 06:23:26 -07:00
'ecore_api.h',
'ecore_exe_eo.legacy.h',
'efl_loop_timer_eo.legacy.h',
]
ecore_src = files([
'efl_app.c',
'ecore.c',
'ecore_alloc.c',
'ecore_anim.c',
'ecore_app.c',
'ecore_events.c',
'ecore_getopt.c',
'ecore_glib.c',
'ecore_idle_enterer.c',
'ecore_idle_exiter.c',
'ecore_idler.c',
'ecore_job.c',
'ecore_main.c',
'ecore_event_message.c',
'ecore_event_message_handler.c',
'efl_loop.c',
'efl_loop_consumer.c',
'efl_loop_fd.c',
'efl_loop_handler.c',
'efl_loop_message.c',
'efl_loop_message_future.c',
'efl_loop_message_handler.c',
'efl_loop_message_future_handler.c',
'efl_task.c',
'efl_io_closer_fd.c',
'efl_io_positioner_fd.c',
'efl_io_reader_fd.c',
'efl_io_sizer_fd.c',
'efl_io_writer_fd.c',
'efl_io_stdin.c',
'efl_io_stdout.c',
'efl_io_stderr.c',
'efl_io_file.c',
'efl_io_copier.c',
'efl_io_buffered_stream.c',
efl_model : rename all efl_model based classes. Summary: As the result of discussion in T7458, we need to rename all efl_model based classes with efl_XXX_Model sequence. I've run few vote for this, see V42, V43 few classes are totally renamed as our consideration of misnaming. | Efl.Model_Loop | Efl.Loop_Model | | Efl.Model_Item | Efl.Generic_Model | | Efl.Model_Container | Efl.Container_Model | | Efl.Model_Container_Item | Efl.Container_Model_Item | | Efl.Model_Composite | Efl.Composite_Model | | Efl.Model_Composite_Boolean | Efl.Boolean_Model | | Efl.Model_Composite_Boolean_Chlidren | Efl.Boolean_Model_Item | | Efl.Model_Composite_Selection | Efl.Select_Model | | Efl.Model_Composite_Selection_Chlidren | Efl.Select_Model_Item | | Efl.Model_View | Efl.View_Model | | Eio.Model | Efl.Io.Model | | Efl.Ui.Model_State | Efl.Ui.State_Model | | Efl.Ui.Model_Size | Efl.Ui.Size_Model | | Efl.Ui.Model_Exact | Efl.Ui.Exact_Model | | Efl.Ui.Model_Average | Efl.Ui.Average_Model | | Efl.Ui.Model_Homogeneous | Efl.Ui.Homogeneous_Model | I worried about Efl.Io.Model changes, cause it is widely used, but as I tested, there is no issue found yet. Eldbus.Model also may can changed Efl.Dbus.Model, but I cannot found any class who using Efl.Dbus namespace, so I left it future work. Test Plan: Run the Make Test, it works well except Efl test about selection. there are class inheritance problem exist in select_model, I reported it and will fix it in another patch. Reviewers: cedric, felipealmeida, woohyun, Hermet Reviewed By: cedric Subscribers: lauromoura Tags: #efl, #do_not_merge Differential Revision: https://phab.enlightenment.org/D7533
2019-01-30 20:35:34 -08:00
'efl_loop_model.c',
'efl_generic_model.c',
'efl_container_model.c',
'efl_composite_model.c',
'efl_boolean_model.c',
'efl_filter_model.c',
'efl_linear_interpolator.c',
'efl_accelerate_interpolator.c',
'efl_decelerate_interpolator.c',
'efl_sinusoidal_interpolator.c',
'efl_divisor_interpolator.c',
'efl_bounce_interpolator.c',
'efl_spring_interpolator.c',
'efl_cubic_bezier_interpolator.c',
'ecore_main_timechanges.c',
'ecore_pipe.c',
'ecore_poller.c',
'ecore_time.c',
'ecore_timer.c',
'ecore_thread.c',
'ecore_throttle.c',
'ecore_exe.c',
'ecore_exe_private.h',
'ecore_private.h',
'ecore_internal.h',
'ecore_main_common.h',
'efl_exe.c',
'efl_thread.c',
'efl_appthread.c',
'efl_threadio.c',
'efl_appthread.c',
'efl_core_env.c',
'efl_core_proc_env.c',
'efl_core_command_line.c',
])
if sys_windows == true
#nothing for now ... needs testing
ecore_src += files(['ecore_exe_win32.c'])
else
ecore_src += files(['ecore_signal.c', 'ecore_exe_posix.c'])
endif
if get_option('glib') == true and sys_windows == false
ecore_ext_deps += dependency('glib-2.0')
ecore_ext_deps += dependency('gthread-2.0')
config_h.set('GLIB_INTEGRATION_ALWAYS', '1')
config_h.set('HAVE_GLIB', '1')
endif
if get_option('g-mainloop') == true
if get_option('glib') == false
error('g-mainloop enabled by glib not. Please enable with -Dglib=true')
else
config_h.set('USE_G_MAIN_LOOP', '1')
endif
endif
ecore_lib = library('ecore',
ecore_src, pub_eo_file_target,
dependencies: ecore_pub_deps + [ecore_deps, ecore_ext_deps],
include_directories : config_dir + [include_directories(join_paths('..','..'))],
install: true,
ecore: Rename EAPI macro to ECORE_API in Ecore library Patch from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass ```__attribute__ ((visibility ("default")))``` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as ```__atttribute__((visibility("default")))```. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why EAPI is the only solution that worked for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
2020-09-20 06:23:26 -07:00
c_args : [package_c_args, '-DECORE_BUILD'],
version : meson.project_version()
)
ecore = declare_dependency(
include_directories: [include_directories('.')],
link_with: ecore_lib,
sources : pub_eo_file_target + priv_eo_file_target,
dependencies: ecore_pub_deps,
)
eolian_ecore_dir = join_paths(eolian_include_dir, package_version_name)
if get_option('install-eo-files')
install_data(pub_eo_files + pub_eo_types_files,
install_dir: eolian_ecore_dir
)
endif
install_headers(ecore_header_src,
install_dir : dir_package_include,
)
#TODO:
# HAVE_TIZEN_CONFIGUREATION_MANAGER
# avahi