mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 11:22:38 -04:00
Add static linkage argument in meson.build.
Those options were added by the kiwix-build.py script. But it's better to add them in the meson.build script to allow people not using kiwix-build to compile static binaries either.
This commit is contained in:
parent
db7e1e5c8f
commit
0f6ca21188
@ -37,7 +37,9 @@ $ ninja install
|
||||
```
|
||||
|
||||
By default, it will compile dynamic linked binaries.
|
||||
If you want statically linked binaries, you can add `--default-library=static`
|
||||
If you want statically linked binaries, you can add `-Dstatic-linkage=true`
|
||||
option to the meson command.
|
||||
Be aware that you must have static library dependencies installed on your
|
||||
system.
|
||||
|
||||
Licensed as GPLv3 or later, see COPYING for more details.
|
||||
|
@ -2,6 +2,11 @@ project('kiwix-tools', 'cpp')
|
||||
|
||||
compiler = meson.get_compiler('cpp')
|
||||
|
||||
static_linkage = get_option('static-linkage')
|
||||
if static_linkage
|
||||
add_global_link_arguments('-static-libstdc++', '--static', language:'cpp')
|
||||
endif
|
||||
|
||||
thread_dep = dependency('threads')
|
||||
kiwixlib_dep = dependency('kiwix')
|
||||
microhttpd_dep = dependency('libmicrohttpd')
|
||||
|
@ -1,2 +1,4 @@
|
||||
option('static-linkage', type : 'boolean', value : false,
|
||||
description : 'Create statically linked binaries.')
|
||||
option('ctpp2-install-prefix', type : 'string', value : '',
|
||||
description : 'Prefix where ctpp libs has been installed')
|
||||
|
Loading…
x
Reference in New Issue
Block a user