mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-09-07 22:27:00 -04:00
Merge pull request #1133 from kiwix/pkgconfig
Generation of libkiwix.pc via meson's pkgconfig module
This commit is contained in:
commit
6ad1776242
10
kiwix.pc.in
10
kiwix.pc.in
@ -1,10 +0,0 @@
|
|||||||
prefix=@prefix@
|
|
||||||
libdir=${prefix}/lib64
|
|
||||||
includedir=${prefix}/include
|
|
||||||
|
|
||||||
Name: libkiwix
|
|
||||||
Description: A library that contains a lot of things used by used by other kiwix programs
|
|
||||||
Version: @version@
|
|
||||||
Requires: @requires@
|
|
||||||
Libs: -L${libdir} -lkiwix @extra_libs@
|
|
||||||
Cflags: -I${includedir}/ @extra_cflags@
|
|
26
meson.build
26
meson.build
@ -35,11 +35,10 @@ else
|
|||||||
error('Cannot found header mustache.hpp')
|
error('Cannot found header mustache.hpp')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libzim_dep = dependency('libzim', version:'>=9.0.0', static:static_deps)
|
libzim_dep = dependency('libzim', version:['>=9.0.0', '<10.0.0'], static:static_deps)
|
||||||
libzim_dep = dependency('libzim', version:'<10.0.0', static:static_deps)
|
|
||||||
|
|
||||||
if not compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN', dependencies: libzim_dep)
|
if not compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN', dependencies: libzim_dep)
|
||||||
error('Libzim seems to be compiled without xapian. Xapian support is mandatory.')
|
error('Libzim seems to be compiled without Xapian. Xapian support is mandatory.')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@ -75,17 +74,10 @@ if get_option('doc')
|
|||||||
subdir('docs')
|
subdir('docs')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
pkg_requires = ['libzim', 'icu-i18n', 'pugixml', 'libcurl', 'libmicrohttpd', 'xapian-core']
|
pkg_mod = import('pkgconfig')
|
||||||
|
pkg_mod.generate(libraries : [libkiwix] + extra_libs,
|
||||||
pkg_conf = configuration_data()
|
version : meson.project_version(),
|
||||||
pkg_conf.set('prefix', get_option('prefix'))
|
name : 'libkiwix',
|
||||||
pkg_conf.set('requires', ' '.join(pkg_requires))
|
filebase : 'libkiwix',
|
||||||
pkg_conf.set('extra_libs', ' '.join(extra_libs))
|
description : 'A library that contains useful primitives that Kiwix readers have in common',
|
||||||
pkg_conf.set('extra_cflags', extra_cflags)
|
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'
|
|
||||||
)
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user