Merge pull request #158 from kiwix/compilation_fix

Use -llog only for Android
This commit is contained in:
Kelson 2018-07-07 22:08:11 +02:00 committed by GitHub
commit cf21f1793c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -15,9 +15,9 @@ to [kiwix-build](https://github.com/kiwix/kiwix-build).
Preamble Preamble
-------- --------
Although the Kiwix library can be compiled/cross-compiled on/for many Although the Kiwix library can be (cross-)compiled on/for many
sytems, the following documentation explains how to do it on POSIX sytems, the following documentation explains how to do it on POSIX
ones. It is primarly though for GNU/Linux systems and has been tested ones. It is primarly thought for GNU/Linux systems and has been tested
on recent releases of Ubuntu and Fedora. on recent releases of Ubuntu and Fedora.
Dependencies Dependencies

View File

@ -7,6 +7,11 @@ compiler = meson.get_compiler('cpp')
find_library_in_compiler = meson.version().version_compare('>=0.31.0') find_library_in_compiler = meson.version().version_compare('>=0.31.0')
static_deps = get_option('android') or get_option('default_library') == 'static' static_deps = get_option('android') or get_option('default_library') == 'static'
if get_option('android')
extra_libs = ['-llog']
else
extra_libs = []
endif
thread_dep = dependency('threads') thread_dep = dependency('threads')
libicu_dep = dependency('icu-i18n', static:static_deps) libicu_dep = dependency('icu-i18n', static:static_deps)
@ -95,7 +100,6 @@ if xapian_dep.found()
pkg_requires += ['xapian-core'] pkg_requires += ['xapian-core']
endif endif
extra_libs = ['-llog']
extra_cflags = '' extra_cflags = ''
if has_ctpp2_dep if has_ctpp2_dep
extra_libs += ctpp2_link_args extra_libs += ctpp2_link_args