File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
android_build/maesdk/src/main/cpp Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ set(CMAKE_CXX_STANDARD 11)
10
10
option (BUILD_AZMON "Build for Azure Monitor" YES )
11
11
option (BUILD_PRIVACYGUARD "Build Privacy Guard" YES )
12
12
13
+ if (ENABLE_CAPI_HTTP_CLIENT )
14
+ add_definitions (-DENABLE_CAPI_HTTP_CLIENT )
15
+ endif ()
16
+
13
17
string (REPLACE "/lib/android_build/maesdk/src/main/cpp" "" SDK_ROOT ${CMAKE_CURRENT_SOURCE_DIR} )
14
18
15
19
if (USE_CURL )
@@ -116,6 +120,10 @@ else()
116
120
list (APPEND SRCS ${SDK_ROOT} /lib/http/HttpClient_Android.cpp )
117
121
endif ()
118
122
123
+ if (ENABLE_CAPI_HTTP_CLIENT )
124
+ list (APPEND SRCS ${SDK_ROOT} /lib/http/HttpClient_CAPI.cpp )
125
+ endif ()
126
+
119
127
add_library (${TARGETNAME} ${SRCS} )
120
128
121
129
target_include_directories (${TARGETNAME} PUBLIC
Original file line number Diff line number Diff line change 5
5
#define MATSDK_DECLSPEC __declspec (dllexport)
6
6
#endif
7
7
8
- #ifndef ANDROID
8
+ #if !defined ( ANDROID) || defined(ENABLE_CAPI_HTTP_CLIENT)
9
9
#include " http/HttpClient_CAPI.hpp"
10
10
#endif
11
11
#include " LogManagerProvider.hpp"
@@ -131,7 +131,7 @@ evt_status_t mat_open_core(
131
131
// Remember the original config string. Needed to avoid hash code collisions
132
132
clients[code].ctx_data = config;
133
133
134
- #ifndef ANDROID
134
+ #if !defined ( ANDROID) || defined(ENABLE_CAPI_HTTP_CLIENT)
135
135
// Create custom HttpClient
136
136
if (httpSendFn != nullptr && httpCancelFn != nullptr )
137
137
{
You can’t perform that action at this time.
0 commit comments