Skip to content

Commit

Permalink
Enable ssl in curl
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin committed Nov 28, 2024
1 parent 5a124d9 commit 00a7abc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/mavsdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ find_package(tinyxml2 REQUIRED)
find_package(libevents REQUIRED)

target_link_libraries(mavsdk
PUBLIC
${CMAKE_DL_LIBS}
PRIVATE
JsonCpp::JsonCpp
tinyxml2::tinyxml2
Expand Down
1 change: 0 additions & 1 deletion src/mavsdk_server/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ target_link_libraries(mavsdk_server
PRIVATE
mavsdk
gRPC::grpc++
${CMAKE_DL_LIBS}
)

if(BUILD_WITH_PROTO_REFLECTION)
Expand Down
4 changes: 0 additions & 4 deletions src/mavsdk_server/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,4 @@ if (BUILD_STATIC_MAVSDK_SERVER)
set_target_properties(unit_tests_mavsdk_server PROPERTIES LINK_SEARCH_END_STATIC ON)
endif()

if(NOT BUILD_STATIC_MAVSDK_SERVER AND ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU"))
target_link_libraries(unit_tests_mavsdk_server PRIVATE ${CMAKE_DL_LIBS})
endif()

add_test(unit_tests unit_tests_mavsdk_server)
8 changes: 7 additions & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ if(SUPERBUILD)
build_target(liblzma)

if(NOT BUILD_WITHOUT_CURL)
build_target(openssl)

if(NOT IOS)
build_target(zlib-ng)
endif()

build_target(curl)
endif()

if(BUILD_MAVSDK_SERVER)
build_target(openssl)
if (BUILD_WITHOUT_CURL)
build_target(openssl)
endif()

build_target(cares)
build_target(absl)
build_target(protobuf)
Expand Down
10 changes: 3 additions & 7 deletions third_party/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ list(APPEND CMAKE_ARGS
"-DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE}"
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DCURL_USE_OPENSSL=OFF"
"-DCURL_USE_OPENSSL=ON"
"-DCURL_USE_LIBSSH2=OFF"
"-DBUILD_CURL_EXE=OFF"
"-DBUILD_SHARED_LIBS=OFF"
"-DCURL_CA_PATH_SET=OFF"
"-DCURL_ZLIB=OFF"
Expand All @@ -19,13 +20,8 @@ list(APPEND CMAKE_ARGS
"-DBUILD_TESTING=OFF"
)

if(ANDROID)
if(IOS)
list(APPEND CMAKE_ARGS
"-DBUILD_CURL_EXE=OFF"
)
elseif(IOS)
list(APPEND CMAKE_ARGS
"-DBUILD_CURL_EXE=OFF"
"-DPLATFORM=${PLATFORM}"
"-DDEPLOYMENT_TARGET=${DEPLOYMENT_TARGET}"
"-DENABLE_STRICT_TRY_COMPILE=${ENABLE_STRICT_TRY_COMPILE}"
Expand Down

0 comments on commit 00a7abc

Please sign in to comment.