Skip to content

Commit 956edcd

Browse files
committed
argparse: generate .pc file with pkg-config module
It's less error-prone to use Meson's module rather than upstream's template.
1 parent 1127323 commit 956edcd

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

releases.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
"argparse"
145145
],
146146
"versions": [
147+
"3.2-2",
147148
"3.2-1",
148149
"3.1-2",
149150
"3.1-1",

subprojects/packagefiles/argparse/meson.build

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ project(
33
'cpp',
44
version: '3.2',
55
license: 'MIT',
6-
meson_version: '>=0.60.0',
6+
meson_version: '>=0.49.0',
77
)
88

99
includes = include_directories(['include'])
@@ -17,17 +17,8 @@ argparse_dep = declare_dependency(
1717
include_directories: includes,
1818
)
1919

20-
conf_data = configuration_data()
21-
conf_data.set('CMAKE_INSTALL_PREFIX', get_option('prefix'))
22-
conf_data.set('CMAKE_INSTALL_INCLUDEDIR', get_option('includedir'))
23-
conf_data.set('PROJECT_NAME', meson.project_name())
24-
conf_data.set('PROJECT_DESCRIPTION', 'A single header argument parser for C++17')
25-
conf_data.set('PROJECT_VERSION', meson.project_version())
26-
configure_file(
27-
input: 'packaging/pkgconfig.pc.in',
28-
output: 'argparse.pc',
29-
configuration: conf_data,
30-
install: true,
31-
install_tag: 'devel',
20+
import('pkgconfig').generate(
21+
name: meson.project_name(),
22+
description: 'A single header argument parser for C++17',
3223
install_dir: get_option('datadir') / 'pkgconfig',
3324
)

0 commit comments

Comments
 (0)