Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ssl in curl #2453

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a need to disable that only for Android and iOS, and disabling it pushes the need for dlopen to the build step, which is convenient.

"-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