Fix library when using use_http=OFF (gh#622)
This commit is contained in:
Родитель
4d50d92255
Коммит
73948b3ea6
|
@ -276,6 +276,8 @@ if(${use_http})
|
|||
./src/httpheaders.c
|
||||
${HTTP_C_FILE}
|
||||
)
|
||||
else()
|
||||
add_definitions(-DHTTP_DISABLED)
|
||||
endif()
|
||||
|
||||
if(${use_schannel})
|
||||
|
|
|
@ -31,11 +31,13 @@ int platform_init(void)
|
|||
{
|
||||
int result = 0;
|
||||
#ifndef DONT_USE_UPLOADTOBLOB
|
||||
#if !defined(HTTP_DISABLED)
|
||||
if (HTTPAPIEX_Init() == HTTPAPIEX_ERROR)
|
||||
{
|
||||
LogError("HTTP for upload to blob failed on initialization.");
|
||||
result = MU_FAILURE;
|
||||
}
|
||||
#endif /* HTTP_DISABLED */
|
||||
#endif /* DONT_USE_UPLOADTOBLOB */
|
||||
#ifdef USE_OPENSSL
|
||||
if (result == 0)
|
||||
|
@ -92,7 +94,9 @@ STRING_HANDLE platform_get_platform_info(PLATFORM_INFO_OPTION options)
|
|||
void platform_deinit(void)
|
||||
{
|
||||
#ifndef DONT_USE_UPLOADTOBLOB
|
||||
#if !defined(HTTP_DISABLED)
|
||||
HTTPAPIEX_Deinit();
|
||||
#endif /* HTTP_DISABLED */
|
||||
#endif /* DONT_USE_UPLOADTOBLOB */
|
||||
#ifdef USE_OPENSSL
|
||||
tlsio_openssl_deinit();
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
#Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
if(UNIX)
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(CURL)
|
||||
if(${use_http})
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(CURL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/azure_c_shared_utilityTargets.cmake")
|
||||
|
|
Загрузка…
Ссылка в новой задаче