forked from enlightenment/efl
meson: add inital support for windows compilation
Differential Revision: https://phab.enlightenment.org/D7416
This commit is contained in:
parent
79ded15ad3
commit
500a36ba3d
|
@ -194,3 +194,8 @@ endif
|
|||
|
||||
config_h.set('SIZEOF_INT', cc.sizeof('int'))
|
||||
config_h.set('SIZEOF_LONG', cc.sizeof('long'))
|
||||
|
||||
if sys_windows == true
|
||||
config_h.set('HAVE_DLSYM', '1')
|
||||
config_h.set('HAVE_NOTIFY_WIN32', '1')
|
||||
endif
|
||||
|
|
28
meson.build
28
meson.build
|
@ -45,6 +45,17 @@ if host_machine.system() == 'darwin'
|
|||
bin_linker_args = ['-pagezero_size', '10000', '-image_base', '100000000']
|
||||
endif
|
||||
|
||||
windows = ['windows', 'cygwin']
|
||||
#bsd for meson 0.46 and 0.47
|
||||
bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd']
|
||||
linux = ['linux']
|
||||
osx = ['darwin']
|
||||
|
||||
sys_linux = linux.contains(host_machine.system())
|
||||
sys_bsd = bsd.contains(host_machine.system())
|
||||
sys_windows = windows.contains(host_machine.system())
|
||||
sys_osx = osx.contains(host_machine.system())
|
||||
|
||||
module_files = []
|
||||
evas_loader_map = []
|
||||
|
||||
|
@ -74,6 +85,11 @@ foreach lang : ['c', 'objc', 'cpp']
|
|||
add_global_arguments('-DNEED_RUN_IN_TREE=1', language: lang)
|
||||
add_global_arguments('-DEFL_BUILD=1', language: lang)
|
||||
add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang)
|
||||
if sys_windows == true
|
||||
add_global_arguments('-DWINVER=0x0601', language: lang)
|
||||
add_global_arguments('-D_WIN32_WINNT=0x0601', language: lang)
|
||||
endif
|
||||
|
||||
endforeach
|
||||
|
||||
config_h = configuration_data()
|
||||
|
@ -150,17 +166,6 @@ endif
|
|||
config_dir = [include_directories('.')]
|
||||
eolian_include_directories = []
|
||||
|
||||
windows = ['windows', 'cygwin']
|
||||
#bsd for meson 0.46 and 0.47
|
||||
bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd']
|
||||
linux = ['linux']
|
||||
osx = ['darwin']
|
||||
|
||||
sys_linux = linux.contains(host_machine.system())
|
||||
sys_bsd = bsd.contains(host_machine.system())
|
||||
sys_windows = windows.contains(host_machine.system())
|
||||
sys_osx = osx.contains(host_machine.system())
|
||||
|
||||
if sys_linux == true or sys_bsd == true
|
||||
sys_lib_extension = 'so'
|
||||
sys_exe_extension = ''
|
||||
|
@ -202,6 +207,7 @@ ecore_evas_wayland_engine_include_dir = []
|
|||
|
||||
subprojects = [
|
||||
# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs
|
||||
['evil' ,[] , false, true, false, false, false, false, [], []],
|
||||
['eina' ,[] , false, true, true, true, true, true, [], []],
|
||||
['eolian' ,[] , false, true, true, false, true, false, ['eina'], []],
|
||||
['eo' ,[] , false, true, false, true, true, false, ['eina'], []],
|
||||
|
|
|
@ -155,6 +155,11 @@ elementary_test_src = [
|
|||
'test.h'
|
||||
]
|
||||
|
||||
if sys_windows == false
|
||||
link_args = '-rdynamic'
|
||||
else
|
||||
link_args = []
|
||||
endif
|
||||
elementary_test = executable('elementary_test',
|
||||
elementary_test_src,
|
||||
dependencies: [elementary] + elementary_deps + elementary_pub_deps,
|
||||
|
@ -164,7 +169,7 @@ elementary_test = executable('elementary_test',
|
|||
'-Delementary_test_LIB_DIR="'+dir_lib+'"',
|
||||
'-Delementary_test_DATA_DIR="'+join_paths(dir_data,'elementary')+'"'
|
||||
],
|
||||
link_args: '-rdynamic'
|
||||
link_args: link_args
|
||||
)
|
||||
|
||||
elementary_config_src = [
|
||||
|
@ -176,20 +181,22 @@ elementary_config = executable('elementary_config',
|
|||
dependencies: [elementary] + elementary_deps + elementary_pub_deps,
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
link_args: '-rdynamic'
|
||||
link_args: link_args
|
||||
)
|
||||
|
||||
elementary_quicklaunch_src = [
|
||||
if sys_windows == false
|
||||
elementary_quicklaunch_src = [
|
||||
'quicklaunch.c'
|
||||
]
|
||||
]
|
||||
|
||||
elementary_quicklaunch = executable('elementary_quicklaunch',
|
||||
elementary_quicklaunch = executable('elementary_quicklaunch',
|
||||
elementary_quicklaunch_src,
|
||||
dependencies: [elementary] + elementary_deps + elementary_pub_deps,
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
link_args: '-rdynamic'
|
||||
)
|
||||
link_args: link_args
|
||||
)
|
||||
endif
|
||||
|
||||
elementary_codegen_src = [
|
||||
'elementary_codegen.c'
|
||||
|
@ -200,7 +207,7 @@ elementary_codegen = executable('elementary_codegen',
|
|||
dependencies: [elementary] + elementary_deps + elementary_pub_deps,
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
link_args: '-rdynamic'
|
||||
link_args: link_args
|
||||
)
|
||||
|
||||
elm_prefs_cc_src = [
|
||||
|
@ -217,7 +224,7 @@ elm_prefs_cc = executable('elm_prefs_cc',
|
|||
dependencies: [elementary] + elementary_deps + elementary_pub_deps,
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
link_args: '-rdynamic'
|
||||
link_args: link_args
|
||||
)
|
||||
|
||||
if meson.is_cross_build()
|
||||
|
@ -229,18 +236,19 @@ else
|
|||
elm_prefs_cc_exe = [env, 'EFL_RUN_IN_TREE=1', elm_prefs_cc.full_path()]
|
||||
endif
|
||||
|
||||
|
||||
elementary_run_src = [
|
||||
if sys_windows == false
|
||||
elementary_run_src = [
|
||||
'run.c'
|
||||
]
|
||||
]
|
||||
|
||||
elementary_run = executable('elementary_run',
|
||||
elementary_run = executable('elementary_run',
|
||||
elementary_run_src,
|
||||
dependencies: [elementary] + elementary_deps + elementary_pub_deps,
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
link_args: '-rdynamic'
|
||||
)
|
||||
link_args: link_args
|
||||
)
|
||||
endif
|
||||
|
||||
elementary_perf_src = [
|
||||
'perf.c',
|
||||
|
@ -262,6 +270,6 @@ elementary_perf = executable('elementary_perf',
|
|||
'-Delementary_test_LIB_DIR="'+dir_lib+'"',
|
||||
'-Delementary_test_DATA_DIR="'+join_paths(dir_data,'elementary')+'"'
|
||||
],
|
||||
link_args: '-rdynamic'
|
||||
link_args: link_args
|
||||
)
|
||||
|
||||
|
|
|
@ -180,11 +180,12 @@ ecore_src = [
|
|||
|
||||
if sys_windows == true
|
||||
#nothing for now ... needs testing
|
||||
ecore_src += ['ecore_exe_win32.c']
|
||||
else
|
||||
ecore_src += ['ecore_signal.c', 'ecore_exe_posix.c']
|
||||
endif
|
||||
|
||||
if get_option('glib') == true
|
||||
if get_option('glib') == true and sys_windows == false
|
||||
ecore_deps += dependency('glib-2.0')
|
||||
ecore_deps += dependency('gthread-2.0')
|
||||
config_h.set('GLIB_INTEGRATION_ALWAYS', '1')
|
||||
|
|
|
@ -70,6 +70,13 @@ if get_option('pulseaudio')
|
|||
config_h.set('HAVE_PULSE', '1')
|
||||
endif
|
||||
|
||||
if sys_windows == true
|
||||
ecore_audio_src += [
|
||||
'ecore_audio_obj_out_wasapi.c'
|
||||
]
|
||||
ecore_audio_deps += [cc.find_library('ksuser', required: true), cc.find_library('winmm', required: true)]
|
||||
endif
|
||||
|
||||
ecore_audio_lib = library('ecore_audio',
|
||||
ecore_audio_src, pub_eo_file_target,
|
||||
dependencies: ecore_audio_pub_deps + [m] + ecore_audio_deps,
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
eina_deps = [dl]
|
||||
eina_pub_deps = [thread_dep]
|
||||
|
||||
if sys_windows == true
|
||||
eina_pub_deps += [evil]
|
||||
endif
|
||||
|
||||
public_sub_headers = [
|
||||
'eina_promise.h',
|
||||
'eina_safety_checks.h',
|
||||
|
@ -368,7 +372,7 @@ execinfo = cc.find_library('execinfo', required: false)
|
|||
|
||||
eina_lib = library('eina', sources,
|
||||
include_directories : config_dir,
|
||||
dependencies: [m, rt, dl, execinfo, iconv, eina_deps, thread_dep, eina_mem_pools],
|
||||
dependencies: [m, rt, dl, execinfo, iconv, eina_deps, thread_dep, eina_mem_pools, evil],
|
||||
install: true,
|
||||
version : meson.project_version()
|
||||
)
|
||||
|
|
|
@ -914,7 +914,12 @@ config_h.set_quoted('MODULES_PATH', join_paths(dir_lib, 'modules'))
|
|||
config_h.set_quoted('ELEMENTARY_BASE_DIR', '.elementary')
|
||||
config_h.set_quoted('ICON_DIR', join_paths(dir_lib, 'icons'))
|
||||
|
||||
elm_options.set('ELM_UNIX', '1')
|
||||
if sys_windows == false
|
||||
elm_options.set('ELM_UNIX', '1')
|
||||
else
|
||||
elm_options.set('DLL_EXPORT', '1')
|
||||
endif
|
||||
|
||||
elm_options.set('ELM_ELOCATION', '1')
|
||||
elm_options.set('ELM_EFREET', '1')
|
||||
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
evil_deps = []
|
||||
evil_pub_deps = []
|
||||
if target_machine.system() == 'windows'
|
||||
evil_header_src = [
|
||||
'Evil.h',
|
||||
'evil_dlfcn.h',
|
||||
'evil_fcntl.h',
|
||||
'evil_langinfo.h',
|
||||
'evil_locale.h',
|
||||
'evil_macro.h',
|
||||
'evil_macro_pop.h',
|
||||
'evil_macro_wrapper.h',
|
||||
'evil_main.h',
|
||||
'evil_stdio.h',
|
||||
'evil_stdlib.h',
|
||||
'evil_string.h',
|
||||
'evil_time.h',
|
||||
'evil_unistd.h',
|
||||
'evil_util.h',
|
||||
'dirent.h',
|
||||
'fnmatch.h',
|
||||
'pwd.h',
|
||||
'regex/regex.h'
|
||||
]
|
||||
evil_header_sys_src = [join_paths('sys','mman.h')]
|
||||
|
||||
evil_src = [
|
||||
'evil_dlfcn.c',
|
||||
'evil_fcntl.c',
|
||||
'evil_fnmatch.c',
|
||||
'evil_fnmatch_list_of_states.c',
|
||||
'evil_langinfo.c',
|
||||
'evil_locale.c',
|
||||
'evil_main.c',
|
||||
'evil_mman.c',
|
||||
'evil_pwd.c',
|
||||
'evil_stdio.c',
|
||||
'evil_stdlib.c',
|
||||
'evil_string.c',
|
||||
'evil_time.c',
|
||||
'evil_unistd.c',
|
||||
'evil_util.c',
|
||||
'evil_private.h',
|
||||
'evil_fnmatch_private.h',
|
||||
]
|
||||
|
||||
subdir('regex')
|
||||
|
||||
psapi = cc.find_library('psapi')
|
||||
ole32 = cc.find_library('ole32')
|
||||
ws2_32 = cc.find_library('ws2_32')
|
||||
secur32 = cc.find_library('secur32')
|
||||
uuid = cc.find_library('uuid')
|
||||
msvcr100 = cc.find_library('msvcr100')
|
||||
|
||||
evil_lib = library('evil', evil_src,
|
||||
dependencies : [psapi, ole32, ws2_32, secur32, uuid, msvcr100],
|
||||
include_directories : [config_dir, include_directories('regex')],
|
||||
)
|
||||
|
||||
evil = declare_dependency(
|
||||
include_directories: [config_dir, include_directories('regex'), include_directories('.')],
|
||||
dependencies : [psapi, ole32, ws2_32, secur32, uuid, msvcr100],
|
||||
link_with: evil_lib,
|
||||
)
|
||||
else
|
||||
evil = declare_dependency()
|
||||
automatic_pkgfile = false
|
||||
endif
|
|
@ -0,0 +1,10 @@
|
|||
evil_src += files([
|
||||
'regcomp.c',
|
||||
'regerror.c',
|
||||
'regexec.c',
|
||||
'regfree.c',
|
||||
'cclass.h',
|
||||
'cname.h',
|
||||
'regex2.h',
|
||||
'utils.h'
|
||||
])
|
|
@ -1,7 +1,6 @@
|
|||
engines = [
|
||||
['cocoa', ['cocoa']],
|
||||
['drm', ['drm']],
|
||||
['extn', []],
|
||||
['fb', ['fb']],
|
||||
['sdl', ['sdl']],
|
||||
['wayland', ['wl']],
|
||||
|
@ -9,6 +8,10 @@ engines = [
|
|||
['x', ['x11']],
|
||||
]
|
||||
|
||||
if sys_windows == false
|
||||
engines += [['extn', []]]
|
||||
endif
|
||||
|
||||
|
||||
foreach engine_conf : engines
|
||||
engine = engine_conf[0]
|
||||
|
|
|
@ -8,15 +8,17 @@ emotion_generic = declare_dependency(
|
|||
dependencies: emotion,
|
||||
)
|
||||
|
||||
shared_module(emotion_loader,
|
||||
if sys_windows == false
|
||||
shared_module(emotion_loader,
|
||||
generic_src,
|
||||
include_directories : config_dir,
|
||||
dependencies: [eina, evas, emotion, generic_deps],
|
||||
dependencies: [eina, evas, emotion, generic_deps, rt],
|
||||
install: true,
|
||||
install_dir : mod_install_dir,
|
||||
c_args : package_c_args,
|
||||
)
|
||||
)
|
||||
|
||||
install_headers('Emotion_Generic_Plugin.h',
|
||||
install_headers('Emotion_Generic_Plugin.h',
|
||||
install_dir : dir_package_include,
|
||||
)
|
||||
)
|
||||
endif
|
||||
|
|
|
@ -9,7 +9,7 @@ draw_src = [
|
|||
|
||||
draw_opt_lib = [ ]
|
||||
|
||||
if cpu_sse3 == true
|
||||
if cpu_sse3 == true and sys_windows == false
|
||||
draw_opt = static_library('draw_opt',
|
||||
sources: [ 'draw_main_sse2.c' ],
|
||||
include_directories: config_dir + [include_directories(join_paths('..', '..', 'lib'))],
|
||||
|
@ -21,16 +21,9 @@ else
|
|||
draw_src += [ 'draw_main_sse2.c' ]
|
||||
endif
|
||||
|
||||
draw_lib = static_library('draw',
|
||||
draw_src,
|
||||
dependencies : [eina, efl],
|
||||
include_directories : config_dir + [include_directories(join_paths('..', '..', 'lib'))],
|
||||
install: false,
|
||||
link_with: draw_opt_lib,
|
||||
)
|
||||
|
||||
draw = declare_dependency(
|
||||
include_directories: [include_directories('.'), include_directories(join_paths('..', '..', 'lib'))],
|
||||
link_with: draw_lib,
|
||||
dependencies: [eina],
|
||||
dependencies: [eina, efl],
|
||||
sources : draw_src,
|
||||
link_with : draw_opt_lib
|
||||
)
|
||||
|
|
|
@ -5,12 +5,7 @@ rg_etc_src = [
|
|||
'rg_etc2.c',
|
||||
]
|
||||
|
||||
rg_etc_lib = static_library('rg_etc', rg_etc_src,
|
||||
dependencies : eina,
|
||||
include_directories : config_dir,
|
||||
)
|
||||
|
||||
rg_etc = declare_dependency(
|
||||
include_directories: include_directories('.'),
|
||||
link_with: rg_etc_lib
|
||||
sources : rg_etc_src
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue