mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
make compilation work on cygwin
This commit is contained in:
parent
995e77c30d
commit
df8aa42778
18 changed files with 40 additions and 26 deletions
|
|
@ -13,10 +13,15 @@ rootinc = include_directories('.')
|
|||
dep = []
|
||||
textui_dep = []
|
||||
need_dl_cross_link = false
|
||||
need_dl_cross_link_main = false
|
||||
dl_cross_irssi_main = []
|
||||
# The Android environment requires that all modules are linked to each other.
|
||||
# See https://github.com/android/ndk/issues/201
|
||||
if host_machine.system() == 'android'
|
||||
need_dl_cross_link = true
|
||||
elif host_machine.system() == 'cygwin'
|
||||
need_dl_cross_link = true
|
||||
need_dl_cross_link_main = true
|
||||
endif
|
||||
|
||||
includedir = get_option('includedir')
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static char *module_get_name(const char *path, int *start, int *end)
|
|||
if (name == NULL)
|
||||
name = path;
|
||||
|
||||
if (strncmp(name, "lib", 3) == 0)
|
||||
if (strncmp(name, "lib", 3) == 0 || strncmp(name, "cyg", 3) == 0)
|
||||
name += 3;
|
||||
|
||||
module_name = g_strdup(name);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ shared_module('fe_irc_dcc',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_dcc,
|
||||
link_with : dl_cross_irc_dcc + dl_cross_irc_core + dl_cross_irssi_main,
|
||||
link_whole : libfe_irc_dcc_a)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ shared_module('fe_common_irc',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_core,
|
||||
link_with : dl_cross_irc_core + dl_cross_irssi_main,
|
||||
link_whole : libfe_common_irc_a)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ shared_module('fe_irc_notifylist',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_notifylist,
|
||||
link_with : dl_cross_irc_notifylist + dl_cross_irssi_main,
|
||||
link_whole : libfe_irc_notifylist_a)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
# this file is part of irssi
|
||||
|
||||
subdir('core')
|
||||
foreach s : chat_modules
|
||||
subdir(s)
|
||||
endforeach
|
||||
# intentionally empty
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
# this file is part of irssi
|
||||
|
||||
executable('botti',
|
||||
fe_none_irssi = executable('botti',
|
||||
files(
|
||||
'irssi.c',
|
||||
),
|
||||
include_directories : rootinc,
|
||||
implicit_include_directories : false,
|
||||
export_dynamic : true,
|
||||
implib : true,
|
||||
link_with : [
|
||||
libconfig_a,
|
||||
libcore_a,
|
||||
|
|
@ -14,6 +15,9 @@ executable('botti',
|
|||
install : true,
|
||||
dependencies : dep
|
||||
)
|
||||
if need_dl_cross_link_main
|
||||
dl_cross_irssi_main = [ fe_none_irssi ]
|
||||
endif
|
||||
|
||||
# noinst_headers = files(
|
||||
# 'module.h',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# this file is part of irssi
|
||||
|
||||
executable('irssi',
|
||||
fe_text_irssi = executable('irssi',
|
||||
files(
|
||||
#### terminfo_sources ####
|
||||
'term-terminfo.c',
|
||||
|
|
@ -35,6 +35,7 @@ executable('irssi',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : false,
|
||||
export_dynamic : true,
|
||||
implib : true,
|
||||
link_with : [
|
||||
libconfig_a,
|
||||
libcore_a,
|
||||
|
|
@ -44,6 +45,9 @@ executable('irssi',
|
|||
dependencies : dep
|
||||
+ textui_dep
|
||||
)
|
||||
if need_dl_cross_link_main
|
||||
dl_cross_irssi_main = [ fe_text_irssi ]
|
||||
endif
|
||||
|
||||
install_headers(
|
||||
files(
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ libirc_core_sm = shared_module('irc_core',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_whole : libirc_core_a)
|
||||
link_whole : libirc_core_a,
|
||||
link_with : dl_cross_irssi_main)
|
||||
|
||||
dl_cross_irc_core = []
|
||||
if need_dl_cross_link
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ libirc_dcc_sm = shared_module('irc_dcc',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_core,
|
||||
link_with : dl_cross_irc_core + dl_cross_irssi_main,
|
||||
dependencies : dep)
|
||||
|
||||
dl_cross_irc_dcc = []
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ shared_module('irc_flood',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_core,
|
||||
link_with : dl_cross_irc_core + dl_cross_irssi_main,
|
||||
link_whole : libirc_flood_a)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ libirc_notifylist_sm = shared_module('irc_notifylist',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_core,
|
||||
link_with : dl_cross_irc_core + dl_cross_irssi_main,
|
||||
dependencies : dep)
|
||||
|
||||
dl_cross_irc_notifylist = []
|
||||
|
|
|
|||
|
|
@ -2,22 +2,23 @@
|
|||
|
||||
subdir('lib-config')
|
||||
subdir('core')
|
||||
foreach s : chat_modules
|
||||
subdir(s)
|
||||
endforeach
|
||||
subdir('fe-common')
|
||||
if have_perl
|
||||
subdir('perl')
|
||||
endif
|
||||
if have_otr
|
||||
subdir('otr')
|
||||
endif
|
||||
subdir('fe-common' / 'core')
|
||||
if want_bot
|
||||
subdir('fe-none')
|
||||
endif
|
||||
if want_textui
|
||||
subdir('fe-text')
|
||||
endif
|
||||
foreach s : chat_modules
|
||||
subdir(s)
|
||||
subdir('fe-common' / s)
|
||||
endforeach
|
||||
if have_perl
|
||||
subdir('perl')
|
||||
endif
|
||||
if have_otr
|
||||
subdir('otr')
|
||||
endif
|
||||
if want_fuzzer
|
||||
subdir('fe-fuzz')
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ shared_module('Irssi',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : true,
|
||||
dependencies : dep + [ perl_dep ],
|
||||
link_with : dl_cross_perl_core,
|
||||
link_with : dl_cross_perl_core + dl_cross_irssi_main,
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ shared_module('Irc',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : true,
|
||||
dependencies : dep + [ perl_dep ],
|
||||
link_with : dl_cross_perl_core + dl_cross_irc_dcc + dl_cross_irc_notifylist,
|
||||
link_with : dl_cross_perl_core + dl_cross_irc_dcc + dl_cross_irc_notifylist + dl_cross_irc_core + dl_cross_irssi_main,
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ libperl_core_sm = shared_module('perl_core',
|
|||
build_rpath : perl_rpath,
|
||||
dependencies : dep_cflagsonly + [ perl_dep ] + dl_cross_dep,
|
||||
override_options : ['b_asneeded=false'],
|
||||
link_with : dl_cross_irssi_main,
|
||||
)
|
||||
|
||||
dl_cross_perl_core = []
|
||||
|
|
@ -61,7 +62,7 @@ shared_module('fe_perl',
|
|||
install : true,
|
||||
install_dir : moduledir,
|
||||
dependencies : dep,
|
||||
link_with : dl_cross_perl_core,
|
||||
link_with : dl_cross_perl_core + dl_cross_irssi_main,
|
||||
)
|
||||
|
||||
subdir('common')
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ shared_module('TextUI',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : true,
|
||||
dependencies : dep + [ perl_dep ],
|
||||
link_with : dl_cross_perl_core,
|
||||
link_with : dl_cross_perl_core + dl_cross_irssi_main,
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ shared_module('UI',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : true,
|
||||
dependencies : dep + [ perl_dep ],
|
||||
link_with : dl_cross_perl_core,
|
||||
link_with : dl_cross_perl_core + dl_cross_irssi_main,
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue