diff --git a/.gitignore b/.gitignore index 8021217..c4c90a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ tags -subprojects/simdjson +subprojects/simdjson/ subprojects/curlcpp/ compile_commands.json +subprojects/beast/ diff --git a/.gitmodules b/.gitmodules index b52e217..52eebb4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "subprojects/wrenpp"] path = subprojects/wrenpp url = https://alarmpi.no-ip.org/gitan/King_DuckZ/wrenpp.git -[submodule "subprojects/beast"] - path = subprojects/beast - url = https://github.com/boostorg/beast.git diff --git a/meson.build b/meson.build index 76ad5ba..a51a618 100644 --- a/meson.build +++ b/meson.build @@ -8,8 +8,6 @@ project('duckticker', 'cpp', full_config_dir = get_option('prefix') / get_option('sysconfdir') compiler_opts = ['-DWRENPP_WITH_NAME_GUESSING'] -beast_include = include_directories('subprojects/beast/include') - subdir('src') #if meson.source_root() != full_config_dir diff --git a/src/meson.build b/src/meson.build index 8a7e7ed..0dae7c4 100644 --- a/src/meson.build +++ b/src/meson.build @@ -10,14 +10,14 @@ wrenpp_dep = dependency('wrenpp', version: '>=0.1.1', default_options: ['wren_with_rand=true'], ) -boost_dep = dependency('boost', version: '>=1.78.0', - modules: ['coroutine', 'filesystem', 'system', 'thread'], -) - simdjson_dep = dependency('simdjson', version: '>=0.5.0', fallback: ['simdjson', 'simdjson_dep'], ) +beast_dep = dependency('beast', version: '>=1.79.0', + fallback: ['beast', 'beast_dep'], +) + executable(meson.project_name(), 'main.cpp', 'nap/http_header_parse.cpp', @@ -28,10 +28,7 @@ executable(meson.project_name(), curlcpp_dep, wrenpp_dep, simdjson_dep, - boost_dep, + beast_dep, ], cpp_args: compiler_opts, - include_directories: [ - beast_include, - ], ) diff --git a/subprojects/beast b/subprojects/beast deleted file mode 160000 index 9d23bec..0000000 --- a/subprojects/beast +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9d23bec2bc523223a377582302bd28d04cb514ed diff --git a/subprojects/beast.wrap b/subprojects/beast.wrap new file mode 100644 index 0000000..5f9c802 --- /dev/null +++ b/subprojects/beast.wrap @@ -0,0 +1,7 @@ +[wrap-git] +url = https://github.com/boostorg/beast.git +revision = a332f55d63b89b7b178a70b56d82315d7957fe90 +patch_directory = beast + +[provide] +dependency_names = beast-1.79.0 diff --git a/subprojects/packagefiles/beast/meson.build b/subprojects/packagefiles/beast/meson.build new file mode 100644 index 0000000..6892471 --- /dev/null +++ b/subprojects/packagefiles/beast/meson.build @@ -0,0 +1,16 @@ +project('beast', 'cpp', + version: '1.79.0', + meson_version: '>=0.49.2', + default_options: ['buildtype=release', 'cpp_std=c++11', 'b_ndebug=if-release'], + license: 'BSL-1.0', +) + +boost_dep = dependency('boost', version: '>=1.78.0', + modules: ['coroutine', 'filesystem', 'system', 'thread'], +) + +public_incl = include_directories('include') +beast_dep = declare_dependency( + include_directories: public_incl, + dependencies: [boost_dep], +)