]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | diff --git a/libpkgconf.pc.in b/libpkgconf.pc.in |
2 | index d278136e3..ef0c7db5f 100644 | |
3 | --- a/libpkgconf.pc.in | |
4 | +++ b/libpkgconf.pc.in | |
5 | @@ -8,4 +8,4 @@ Description: a library for accessing and manipulating development framework conf | |
6 | URL: http://github.com/pkgconf/pkgconf | |
7 | Version: @PACKAGE_VERSION@ | |
8 | CFlags: -I${includedir}/pkgconf | |
9 | -Libs: -L${libdir} -lpkgconf | |
10 | +Libs: -L${libdir} -lpkgconf @build_static@ | |
11 | diff --git a/meson.build b/meson.build | |
12 | index e7822b8da..8f7aa0075 100644 | |
13 | --- a/meson.build | |
14 | +++ b/meson.build | |
15 | @@ -45,6 +45,13 @@ cdata.set('abs_top_builddir', meson.build_root()) | |
16 | ||
17 | subdir('libpkgconf') | |
18 | ||
19 | +libtype = get_option('default_library') | |
20 | +if libtype == 'static' | |
21 | + build_static = '-DPKGCONFIG_IS_STATIC' | |
22 | +else | |
23 | + build_static = '' | |
24 | +endif | |
25 | + | |
26 | libpkgconf = library('pkgconf', | |
27 | 'libpkgconf/argvsplit.c', | |
28 | 'libpkgconf/audit.c', | |
29 | @@ -60,7 +67,7 @@ libpkgconf = library('pkgconf', | |
30 | 'libpkgconf/pkg.c', | |
31 | 'libpkgconf/queue.c', | |
32 | 'libpkgconf/tuple.c', | |
33 | - c_args: '-DLIBPKGCONF_EXPORT', | |
34 | + c_args: ['-DLIBPKGCONF_EXPORT', build_static], | |
35 | install : true, | |
36 | version : '3.0.0', | |
37 | soversion : '3', | |
38 | @@ -73,13 +80,16 @@ pkg.generate(libpkgconf, | |
39 | url: 'http://github.com/pkgconf/pkgconf', | |
40 | filebase : 'libpkgconf', | |
41 | subdirs: ['pkgconf'], | |
42 | + extra_cflags : build_static | |
43 | ) | |
44 | ||
45 | + | |
46 | pkgconf_exe = executable('pkgconf', | |
47 | 'cli/main.c', | |
48 | 'cli/getopt_long.c', | |
49 | 'cli/renderer-msvc.c', | |
50 | link_with : libpkgconf, | |
51 | + c_args: build_static, | |
52 | install : true) | |
53 | ||
54 | if get_option('tests') |