mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
* [API Break] Remove wrapper around libzim (@mgautierfr #789) * Allow kiwix-serve to use custom resource files (@veloman-yunkan #779) * Properly handle searchProtocolPrefix when rendering search result (@veloman-yunkan #823) * Prevent search on multi language content (@veloman-yunkan #838) * Use new `zim::Archive::getMediaCount` from libzim (@mgautierfr #836) * Catalog: - Include tags in free text catalog search (@veloman-yunkan #802) - Illustration's url is based on book's uuid (@veloman-yunkan #804) - Cleanup of the opds-dumper (@veloman-yunkan #829) - Allow filtering of catalog content using multiple languages (@veloman-yunkan #841) - Make opds-dumper respect the namemapper (@mgautierfr #837) * Server: - Correctly handle `\` in suggestion json generation (@veloman-yunkan #843) - Better http caching (@veloman-yunkan #833) - Make `/suggest` endpoint thread-safe (@veloman-yunkan #834) - Better redirection of main page (@veloman-yunkan #827) - Remove jquery (@mgautierfr @juuz0 #796) - Better Viewer of zim content : . Introduce `/content` endpoints (@veloman-yunkan #806) . Switch to iframe based content viewer (@veloman-yunkan #716) - Optimised design of the welcome page: . Alignement (@juuz0 @kelson42 #786) . Exit download modal on pressing escape key (@juzz0 #800) . Add favicon for different devices (@juzz0 #805) . Fix auto hidding of the toolbar (@veloman-yunkan #821) . Allow user to filter books by tags in the front page (@juuz0 #711) * CI : - Trigger CI on pull_request (@kelson42 #791) - Drop Ubuntu Impish packaging (@legoktm #825) - Add Ubuntu Kinetic packaging (@legoktm #801) * Testing: - Test ICULanguageInfo (@veloman-yunkan #795) - Introduce fake `test` language to test i18n (@veloman-yunkan #848) * Fix documentation (@kelson42 #816) * Udpate translation (#787 #839 #847)
90 lines
2.8 KiB
Meson
90 lines
2.8 KiB
Meson
project('libkiwix', 'cpp',
|
|
version : '12.0.0',
|
|
license : 'GPLv3+',
|
|
default_options : ['c_std=c11', 'cpp_std=c++11', 'werror=true'])
|
|
|
|
compiler = meson.get_compiler('cpp')
|
|
|
|
static_deps = get_option('static-linkage') or get_option('default_library') == 'static'
|
|
|
|
# See https://github.com/kiwix/libkiwix/issues/371
|
|
if ['arm', 'mips', 'm68k', 'ppc', 'sh4'].contains(host_machine.cpu_family())
|
|
extra_libs = ['-latomic']
|
|
else
|
|
extra_libs = []
|
|
endif
|
|
|
|
if (compiler.get_id() == 'gcc' and build_machine.system() == 'linux') or host_machine.system() == 'freebsd'
|
|
# C++ std::thread is implemented using pthread on linux by gcc
|
|
thread_dep = dependency('threads')
|
|
else
|
|
thread_dep = dependency('', required:false)
|
|
endif
|
|
libicu_dep = dependency('icu-i18n', static:static_deps)
|
|
pugixml_dep = dependency('pugixml', static:static_deps)
|
|
libcurl_dep = dependency('libcurl', static:static_deps)
|
|
microhttpd_dep = dependency('libmicrohttpd', static:static_deps)
|
|
zlib_dep = dependency('zlib', static:static_deps)
|
|
xapian_dep = dependency('xapian-core', static:static_deps)
|
|
|
|
if compiler.has_header('mustache.hpp')
|
|
extra_include = []
|
|
elif compiler.has_header('mustache.hpp', args: '-I/usr/include/kainjow')
|
|
extra_include = ['/usr/include/kainjow']
|
|
else
|
|
error('Cannot found header mustache.hpp')
|
|
endif
|
|
|
|
libzim_dep = dependency('libzim', version : '>=8.1.0', static:static_deps)
|
|
if not compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN')
|
|
error('Libzim seems to be compiled without xapian. Xapian support is mandatory.')
|
|
endif
|
|
|
|
|
|
extra_cflags = ''
|
|
if host_machine.system() == 'windows' and static_deps
|
|
add_project_arguments('-DCURL_STATICLIB', language : 'cpp')
|
|
extra_cflags += '-DCURL_STATICLIB'
|
|
endif
|
|
|
|
if host_machine.system() == 'windows'
|
|
add_project_arguments('-DNOMINMAX', language: 'cpp')
|
|
endif
|
|
|
|
all_deps = [thread_dep, libicu_dep, libzim_dep, pugixml_dep, libcurl_dep, microhttpd_dep, zlib_dep, xapian_dep]
|
|
|
|
inc = include_directories('include', extra_include)
|
|
|
|
conf = configuration_data()
|
|
conf.set('LIBKIWIX_VERSION', '"@0@"'.format(meson.project_version()))
|
|
|
|
if build_machine.system() == 'windows'
|
|
extra_link_args = ['-lshlwapi', '-lwinmm']
|
|
else
|
|
extra_link_args = []
|
|
endif
|
|
|
|
subdir('include')
|
|
subdir('scripts')
|
|
subdir('static')
|
|
subdir('src')
|
|
subdir('test')
|
|
if get_option('doc')
|
|
subdir('docs')
|
|
endif
|
|
|
|
pkg_requires = ['libzim', 'icu-i18n', 'pugixml', 'libcurl', 'libmicrohttpd', 'xapian-core']
|
|
|
|
pkg_conf = configuration_data()
|
|
pkg_conf.set('prefix', get_option('prefix'))
|
|
pkg_conf.set('requires', ' '.join(pkg_requires))
|
|
pkg_conf.set('extra_libs', ' '.join(extra_libs))
|
|
pkg_conf.set('extra_cflags', extra_cflags)
|
|
pkg_conf.set('version', meson.project_version())
|
|
configure_file(output : 'kiwix.pc',
|
|
configuration : pkg_conf,
|
|
input : 'kiwix.pc.in',
|
|
install_dir: get_option('libdir')+'/pkgconfig'
|
|
)
|
|
|