Skip to content

Commit

Permalink
third_party: don't bother with https
Browse files Browse the repository at this point in the history
Getting the OpenSSL dependency to work with cURL is too hard for me.
  • Loading branch information
julianoes committed Nov 11, 2024
1 parent 50ee84c commit 38258b4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/mavsdk/plugins/camera/camera_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ void CameraImpl::check_camera_definition_with_lock(PotentialCamera& potential_ca
potential_camera.camera_definition_result = Camera::Result::ProtocolUnsupported;
notify_camera_list_with_lock();

} else if (starts_with(url, "http://") || starts_with(url, "https://")) {
} else if (starts_with(url, "http://"))) {
#if BUILD_WITHOUT_CURL == 1
potential_camera.camera_definition_result = Camera::Result::ProtocolUnsupported;
notify_camera_list();
Expand Down
14 changes: 7 additions & 7 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ if(SUPERBUILD)
build_target(tinyxml2)
build_target(liblzma)

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

if(BUILD_MAVSDK_SERVER)
build_target(openssl)
build_target(cares)
Expand All @@ -22,13 +29,6 @@ if(SUPERBUILD)
build_target(grpc)
endif()

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

if(BUILD_TESTING)
build_target(gtest)
endif()
Expand Down
5 changes: 2 additions & 3 deletions third_party/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ 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=ON"
"-DCURL_USE_OPENSSL=OFF"
"-DCURL_USE_LIBSSH2=OFF"
"-DUSE_LIBIDN2=OFF"
"-DBUILD_SHARED_LIBS=OFF"
"-DCURL_CA_PATH_SET=OFF"
"-DCURL_ZLIB=OFF"
"-DHTTP_ONLY=OFF"
"-DHTTP_ONLY=ON"
"-DHAVE_POSIX_STRERROR_R=1"
"-DBUILD_TESTING=OFF"
)
Expand Down
2 changes: 1 addition & 1 deletion third_party/openssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ else()
openssl
URL https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
PREFIX openssl
CONFIGURE_COMMAND <SOURCE_DIR>/config ${OPENSSL_BUILD_TYPE} --prefix=${CMAKE_INSTALL_PREFIX} no-shared no-module
CONFIGURE_COMMAND <SOURCE_DIR>/config ${OPENSSL_BUILD_TYPE} --prefix=${CMAKE_INSTALL_PREFIX} no-shared
BUILD_COMMAND make
INSTALL_COMMAND make install_sw
)
Expand Down

0 comments on commit 38258b4

Please sign in to comment.