Add curlcpp subproject

This commit is contained in:
King_DuckZ 2020-08-27 23:55:15 +01:00
parent 5ef7a880e0
commit e856918963
6 changed files with 76 additions and 1 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ tags
compile_commands.json
links.txt
*.bin
subprojects/curlcpp/

View file

@ -1,6 +1,6 @@
project('orotool', 'cpp', 'c',
version: '0.1.0',
meson_version: '>=0.49.2',
meson_version: '>=0.55.0',
default_options: ['buildtype=debug', 'cpp_std=gnu++17', 'b_ndebug=if-release'],
license: 'GPL3+',
)

View file

@ -6,6 +6,13 @@ restc_cpp_dep = dependency('restc-cpp', version: '>=0.1.1',
],
)
curlcpp_dep = dependency('curlcpp', version: '>=1.4',
fallback: ['curlcpp', 'curlcpp_dep'],
default_options: [
'default_library=static',
],
)
if not get_option('with_sqlite').disabled()
sqlitecpp_dep = dependency('sqlitecpp', version: '>=3.0.0',
fallback: ['SQLiteCpp', 'sqlitecpp_dep'],

7
subprojects/curlcpp.wrap Normal file
View file

@ -0,0 +1,7 @@
[wrap-git]
url = https://github.com/JosephP91/curlcpp.git
revision = cb426314da69a6a66ac50437362844e6333ca5a9
patch_directory = curlcpp
[provide]
dependency_names = curlcpp-1.4

View file

@ -0,0 +1,36 @@
project('curlcpp', 'cpp',
version: '1.4',
meson_version: '>=0.49.2',
default_options: ['buildtype=release', 'cpp_std=c++11', 'b_ndebug=if-release'],
license: 'MIT',
)
curl_dep = dependency('libcurl', version: '>=7.28.0')
public_incl = include_directories('include')
subdir('src')
install_headers(
'include/cookie.h',
'include/cookie_date.h',
'include/cookie_datetime.h',
'include/cookie_time.h',
'include/curl_config.h',
'include/curl_cookie.h',
'include/curl_easy.h',
'include/curl_easy_info.h',
'include/curl_exception.h',
'include/curl_form.h',
'include/curl_global.h',
'include/curl_header.h',
'include/curl_info.h',
'include/curl_interface.h',
'include/curl_ios.h',
'include/curl_multi.h',
'include/curl_option.h',
'include/curl_pair.h',
'include/curl_receiver.h',
'include/curl_sender.h',
'include/curl_share.h',
'include/curl_utility.h',
subdir: meson.project_name(),
)

View file

@ -0,0 +1,24 @@
curlcpp = library(meson.project_name(),
'curl_easy.cpp',
'curl_header.cpp',
'curl_global.cpp',
'curl_form.cpp',
'curl_multi.cpp',
'curl_share.cpp',
'curl_info.cpp',
'curl_cookie.cpp',
'curl_exception.cpp',
'cookie.cpp',
'cookie_date.cpp',
'cookie_time.cpp',
'cookie_datetime.cpp',
dependencies: [curl_dep],
include_directories: public_incl,
install: true,
)
curlcpp_dep = declare_dependency(
link_with: curlcpp,
include_directories: public_incl,
dependencies: curl_dep.partial_dependency(includes: true),
)