Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@
"cpr"
],
"versions": [
"1.13.0-1",
"1.12.0-1",
"1.11.2-1",
"1.11.1-1",
Expand Down
10 changes: 5 additions & 5 deletions subprojects/cpr.wrap
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[wrap-file]
directory = cpr-1.12.0
source_url = https://github.com/libcpr/cpr/archive/1.12.0.tar.gz
source_filename = cpr-1.12.0.tar.gz
source_hash = f64b501de66e163d6a278fbb6a95f395ee873b7a66c905dd785eae107266a709
directory = cpr-1.13.0
source_url = https://github.com/libcpr/cpr/archive/1.13.0.tar.gz
source_filename = cpr-1.13.0.tar.gz
source_hash = c55d805300c224f099cad74ad9c68799f23d005d09ba2df76ead975a3e50e09d
patch_directory = cpr

[provide]
cpr = cpr_dep
dependency_names = cpr
1 change: 1 addition & 0 deletions subprojects/packagefiles/cpr/cpr/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ cpr_src = files(
'auth.cpp',
'callback.cpp',
'cert_info.cpp',
'connection_pool.cpp',
'cookies.cpp',
'cprtypes.cpp',
'curl_container.cpp',
Expand Down
13 changes: 11 additions & 2 deletions subprojects/packagefiles/cpr/meson.build
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
project(

Check warning on line 1 in subprojects/packagefiles/cpr/meson.build

View workflow job for this annotation

GitHub Actions / Ubuntu (x86_64)

Minimum Meson version is 0.63.0

0.46.0: format arg in configure_file, subdir_done 0.47.0: User option "feature" 0.54.0: meson.override_dependency 0.63.0: cpp_std in subproject default_options
'cpr',
'cpp',
version: '1.12.0',
version: '1.13.0',
license: 'MIT',
default_options: 'cpp_std=c++17',
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add meson_version: '>=0.63.0' while we're here. (Alternatively 0.54.0 if you move cpp_std to override_options on the library() and executable() calls, preferably via an intermediate variable.)


curl_dep = dependency(
'libcurl',
version: '>=7.64.0',
version: '>=7.71.0',
)
thread_dep = dependency('threads')

includes = include_directories('.', 'include')
subdir('cpr')

includes = include_directories('include')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think . was included because cpr/cpr.h includes cpr/cprver.h, and the latter is generated in cpr/ in the build directory and currently is not installed. So this will break the includes.

You should install cprver.h, of course, but that won't help a superproject or sibling subproject find that header when cpr hasn't been installed. I'd suggest generating cprver.h from a new include/cpr/meson.build, and also calling install_headers() from there. (I'm open to other ideas, though.)

If you do that, and invoke subdir('include/cpr') before subdir('cpr'), includes shouldn't need to contain '.' at all.

install_subdir(
'include/cpr',
install_dir: get_option('includedir'),
)

cpr_lib = library(
'cpr',
include_directories: includes,
sources: cpr_src,
dependencies: [curl_dep, thread_dep],
version: meson.project_version(),
install: true,
)

cpr_dep = declare_dependency(
include_directories: includes,
link_with: cpr_lib,
dependencies: [curl_dep, thread_dep],
)
meson.override_dependency('cpr', cpr_dep)

subdir('test')
1 change: 1 addition & 0 deletions subprojects/packagefiles/cpr/test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tests = [
# 'alternating',
# 'async',
# 'callback',
# 'connection_pool',
# 'delete',
# 'download',
'encoded_auth',
Expand Down
Loading