Skip to content

Commit 006ffd2

Browse files
Enable ssl in curl
1 parent 5a124d9 commit 006ffd2

File tree

7 files changed

+16
-8
lines changed

7 files changed

+16
-8
lines changed

examples/autopilot_server/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ find_package(Threads REQUIRED)
1515
target_link_libraries(autopilot_server
1616
MAVSDK::mavsdk
1717
Threads::Threads
18+
${CMAKE_DL_LIBS}
1819
)
1920

2021
if(NOT MSVC)

src/integration_tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ target_link_libraries(integration_tests_runner
7575
GTest::gtest
7676
GTest::gtest_main
7777
GTest::gmock
78+
${CMAKE_DL_LIBS}
7879
)
7980

8081
add_test(integration_tests

src/mavsdk/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ find_package(tinyxml2 REQUIRED)
1414
find_package(libevents REQUIRED)
1515

1616
target_link_libraries(mavsdk
17+
PUBLIC
18+
${CMAKE_DL_LIBS}
1719
PRIVATE
1820
JsonCpp::JsonCpp
1921
tinyxml2::tinyxml2

src/system_tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ target_link_libraries(system_tests_runner
3535
GTest::gtest
3636
GTest::gtest_main
3737
GTest::gmock
38+
${CMAKE_DL_LIBS}
3839
)
3940

4041
set_target_properties(system_tests_runner

src/unit_tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ target_link_libraries(unit_tests_runner
1919
GTest::gtest
2020
GTest::gtest_main
2121
GTest::gmock
22+
${CMAKE_DL_LIBS}
2223
)
2324

2425
target_include_directories(unit_tests_runner

third_party/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,20 @@ if(SUPERBUILD)
1414
build_target(liblzma)
1515

1616
if(NOT BUILD_WITHOUT_CURL)
17+
build_target(openssl)
18+
1719
if(NOT IOS)
1820
build_target(zlib-ng)
1921
endif()
22+
2023
build_target(curl)
2124
endif()
2225

2326
if(BUILD_MAVSDK_SERVER)
24-
build_target(openssl)
27+
if (BUILD_WITHOUT_CURL)
28+
build_target(openssl)
29+
endif()
30+
2531
build_target(cares)
2632
build_target(absl)
2733
build_target(protobuf)

third_party/curl/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ list(APPEND CMAKE_ARGS
99
"-DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE}"
1010
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
1111
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
12-
"-DCURL_USE_OPENSSL=OFF"
12+
"-DCURL_USE_OPENSSL=ON"
1313
"-DCURL_USE_LIBSSH2=OFF"
14+
"-DBUILD_CURL_EXE=OFF"
1415
"-DBUILD_SHARED_LIBS=OFF"
1516
"-DCURL_CA_PATH_SET=OFF"
1617
"-DCURL_ZLIB=OFF"
@@ -19,13 +20,8 @@ list(APPEND CMAKE_ARGS
1920
"-DBUILD_TESTING=OFF"
2021
)
2122

22-
if(ANDROID)
23+
if(IOS)
2324
list(APPEND CMAKE_ARGS
24-
"-DBUILD_CURL_EXE=OFF"
25-
)
26-
elseif(IOS)
27-
list(APPEND CMAKE_ARGS
28-
"-DBUILD_CURL_EXE=OFF"
2925
"-DPLATFORM=${PLATFORM}"
3026
"-DDEPLOYMENT_TARGET=${DEPLOYMENT_TARGET}"
3127
"-DENABLE_STRICT_TRY_COMPILE=${ENABLE_STRICT_TRY_COMPILE}"

0 commit comments

Comments
 (0)