mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Add a new meson option : -Dstatic-dependency=yes to use static dependencies
This commit is contained in:
parent
991e24fb27
commit
7aa67b142b
19
meson.build
19
meson.build
@ -41,7 +41,10 @@ with_perl_lib = get_option('with-perl-lib')
|
||||
require_otr = get_option('with-otr') == 'yes'
|
||||
want_otr = get_option('with-otr') != 'no'
|
||||
|
||||
want_glib_internal = get_option('install-glib') == 'yes'
|
||||
want_glib_internal = get_option('install-glib') != 'no'
|
||||
require_glib_internal = get_option('install-glib') == 'force'
|
||||
|
||||
want_static_dependency = get_option('static-dependency') == 'yes'
|
||||
|
||||
chat_modules = ['irc']
|
||||
|
||||
@ -149,7 +152,11 @@ message('*** to download and build it automatically')
|
||||
message('*** Or alternatively install your distribution\'s package')
|
||||
message('*** On Debian: sudo apt-get install libglib2.0-dev')
|
||||
message('*** On Redhat: dnf install glib2-devel')
|
||||
glib_dep = dependency('glib-2.0', version : '>=2.28', required : not want_glib_internal)
|
||||
if not require_glib_internal
|
||||
glib_dep = dependency('glib-2.0', version : '>=2.28', required : not want_glib_internal, static : want_static_dependency)
|
||||
else
|
||||
glib_dep = dependency('', required : false)
|
||||
endif
|
||||
if not glib_dep.found()
|
||||
glib_internal = true
|
||||
meson_cmd = find_program('meson')
|
||||
@ -200,12 +207,12 @@ if not glib_dep.found()
|
||||
link_args : [ meson.current_build_dir() / 'build-subprojects' / 'glib' / 'gmodule' / 'libgmodule-2.0.a' ],
|
||||
)
|
||||
else
|
||||
gmodule_dep = dependency('gmodule-2.0')
|
||||
gmodule_dep = dependency('gmodule-2.0', static : want_static_dependency)
|
||||
endif
|
||||
dep += glib_dep
|
||||
dep += gmodule_dep
|
||||
|
||||
openssl_dep = dependency('openssl')
|
||||
openssl_dep = dependency('openssl', static : want_static_dependency)
|
||||
dep += openssl_dep
|
||||
|
||||
############
|
||||
@ -365,8 +372,8 @@ endif
|
||||
|
||||
have_otr = false
|
||||
if want_otr
|
||||
libgcrypt = dependency('libgcrypt', version : '>=1.2.0', required : require_otr)
|
||||
libotr = dependency('libotr', version : '>=4.1.0', required : require_otr)
|
||||
libgcrypt = dependency('libgcrypt', version : '>=1.2.0', required : require_otr, static : want_static_dependency)
|
||||
libotr = dependency('libotr', version : '>=4.1.0', required : require_otr, static : want_static_dependency)
|
||||
if libgcrypt.found() and libotr.found()
|
||||
dep += libgcrypt
|
||||
dep += libotr
|
||||
|
@ -10,5 +10,6 @@ option('enable-true-color', type : 'combo', description : 'Build with true colo
|
||||
option('disable-gregex', type : 'combo', description : 'Build without GRegex (fall back to regex.h)', choices : ['no', 'yes'])
|
||||
option('disable-utf8proc', type : 'combo', description : 'Build without Julia\'s utf8proc', choices : ['auto', 'yes', 'no'])
|
||||
option('with-capsicum', type : 'combo', description : 'Build with Capsicum support', choices : ['auto', 'yes', 'no'])
|
||||
option('install-glib', type : 'combo', description : 'Download and install GLib for you', choices : ['no', 'yes'])
|
||||
option('static-dependency', type : 'combo', description : 'Request static dependencies', choices : ['no', 'yes'])
|
||||
option('install-glib', type : 'combo', description : 'Download and install GLib for you', choices : ['no', 'yes', 'force'])
|
||||
option('docdir', type : 'string', description : 'Documentation directory')
|
||||
|
Loading…
Reference in New Issue
Block a user