Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
uchenily committed May 31, 2024
1 parent 01ea785 commit 79f6310
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions examples/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ curl_examples_sources = [
'example_curl.cpp',
'coro_curl.cpp',
]
# curl_dep = dependency('libcurl')
curl_dep = cpp.find_library('curl', required: false)
if curl_dep.found()
foreach source: curl_examples_sources
target_name = source.replace('.cpp', '')
target = executable(target_name, source,
include_directories: includes,
cpp_args: compile_args,
compile_definitions: compile_definitions,
dependencies: dependencies + curl_dep)

test(target_name, target)
Expand Down
5 changes: 5 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ project('uvio', 'cpp',
meson_version: '>=0.63.0')

compile_args = []
compile_definations = []

includes = include_directories('.')

cpp = meson.get_compiler('cpp')
libuv_dep = dependency('libuv')
libbfd_dep = cpp.find_library('bfd', required: false)
llhttp_dep = dependency('llhttp')
curl_dep = cpp.find_library('curl', required: false)
if curl_dep.found()
compile_definitions += '-DHAS_CURL'
endif

dependencies = []
dependencies += libuv_dep
Expand Down
2 changes: 2 additions & 0 deletions uvio/net/http/http_client.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#if defined(HAS_CURL)

#include "uvio/common/result.hpp"
#include "uvio/debug.hpp"
Expand Down Expand Up @@ -231,3 +232,4 @@ class HttpClient {
static inline bool curl_inited_{false};
};
} // namespace uvio::net::http
#endif

0 comments on commit 79f6310

Please sign in to comment.