Skip to content

Commit 004b69f

Browse files
committed
try curl compat for win...
1 parent 0edf41a commit 004b69f

File tree

1 file changed

+17
-23
lines changed
  • subprojects/packagefiles/azure-sdk-for-cpp/sdk/core/azure-core

1 file changed

+17
-23
lines changed

subprojects/packagefiles/azure-sdk-for-cpp/sdk/core/azure-core/meson.build

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -132,26 +132,20 @@ install_headers(
132132
subdir: 'azure/core/tracing',
133133
)
134134

135-
if host_machine.system() == 'windows'
136-
cc = meson.get_compiler('cpp')
137-
wil_dep = cc.find_library('wil')
138-
azure_core_url_headers = [
139-
'inc/azure/core/http/win_http_transport.hpp',
140-
]
141-
142-
azure_core_url_sources = [
143-
'src/http/winhttp/win_http_transport.cpp',
144-
'src/http/winhttp/win_http_request.hpp',
145-
]
146-
147-
install_headers(
148-
azure_core_url_headers,
149-
subdir: 'azure/core/http',
150-
)
151-
else
152-
azure_core_url_headers = []
153-
azure_core_url_sources = []
154-
endif
135+
libcurl_dep = dependency('libcurl')
136+
azure_core_curl_headers = ['inc/azure/core/http/curl_transport.hpp']
137+
138+
azure_core_curl_sources = [
139+
'src/http/curl/curl.cpp',
140+
'src/http/curl/curl_connection_pool_private.hpp',
141+
'src/http/curl/curl_connection_private.hpp',
142+
'src/http/curl/curl_session_private.hpp',
143+
]
144+
145+
install_headers(
146+
azure_core_curl_headers,
147+
subdir: 'azure/core/http',
148+
)
155149

156150
azure_core_headers_all = (azure_core_headers
157151
+ azure_core_http_headers
@@ -165,7 +159,7 @@ azure_core_headers_all = (azure_core_headers
165159
+ azure_core_internal_tracing_headers
166160
+ azure_core_io_headers
167161
+ azure_core_tracing_headers
168-
+ azure_core_url_headers
162+
+ azure_core_curl_headers
169163
)
170164

171165
azure_core_sources = [
@@ -210,9 +204,9 @@ endif
210204

211205
azure_core_lib = library(
212206
'azure-core',
213-
sources: azure_core_headers_all + azure_core_sources + azure_core_url_sources,
207+
sources: azure_core_headers_all + azure_core_sources + azure_core_curl_sources,
214208
include_directories: incdir,
215-
dependencies: azure_crypto_dep,
209+
dependencies: [azure_crypto_dep, libcurl_dep],
216210
cpp_args: ['-DAZ_CORE_BEING_BUILT'] + azure_core_args,
217211
)
218212

0 commit comments

Comments
 (0)