From 7cb5d60552643bfe29f9c4b1d942aade8a9d2a46 Mon Sep 17 00:00:00 2001 From: Bogdan Livadariu Date: Fri, 9 Dec 2022 10:34:57 +0200 Subject: [PATCH 1/4] fix: upload crashes on linux as per description and comments on: https://github.com/getsentry/sentry-native/issues/773 --- util/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index 4c1d0e6f93..8284ca7e4f 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -246,7 +246,7 @@ endif() if(LINUX OR ANDROID) target_sources(crashpad_util PRIVATE - net/http_transport_socket.cc + net/http_transport_libcurl.cc linux/address_types.h linux/auxiliary_vector.cc linux/auxiliary_vector.h From b54c536c4b7304630583102fb95ec1b370a7e5a6 Mon Sep 17 00:00:00 2001 From: Bogdan Livadariu Date: Fri, 9 Dec 2022 11:46:40 +0200 Subject: [PATCH 2/4] add curl as dependency --- util/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index 8284ca7e4f..deb72b9e0b 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -245,6 +245,8 @@ if(ANDROID) endif() if(LINUX OR ANDROID) + find_package(CURL REQUIRED) + target_sources(crashpad_util PRIVATE net/http_transport_libcurl.cc linux/address_types.h From c38480807754da4fbbde1c145ecc00c53e03c732 Mon Sep 17 00:00:00 2001 From: Bogdan Livadariu Date: Thu, 12 Jan 2023 16:15:52 +0200 Subject: [PATCH 3/4] Update util/CMakeLists.txt with suggestions Co-authored-by: Mischan Toosarani-Hausberger --- util/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index deb72b9e0b..4a1ada5453 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -245,7 +245,14 @@ if(ANDROID) endif() if(LINUX OR ANDROID) - find_package(CURL REQUIRED) + if (LINUX) + find_package(CURL REQUIRED) + target_include_directories(crashpad_util PRIVATE ${CURL_INCLUDE_DIRS}) + target_link_libraries(crashpad_util PRIVATE ${CURL_LIBRARIES}) + SET(HTTP_TRANSPORT_IMPL net/http_transport_libcurl.cc) + else() + SET(HTTP_TRANSPORT_IMPL net/http_transport_socket.cc) + endif() target_sources(crashpad_util PRIVATE net/http_transport_libcurl.cc From b94eea165c84a431713f231c18abf97d42997af9 Mon Sep 17 00:00:00 2001 From: Bogdan Livadariu Date: Thu, 12 Jan 2023 16:16:10 +0200 Subject: [PATCH 4/4] Update util/CMakeLists.txt with variable Co-authored-by: Mischan Toosarani-Hausberger --- util/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index 4a1ada5453..9789ce58b0 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -255,7 +255,7 @@ if(LINUX OR ANDROID) endif() target_sources(crashpad_util PRIVATE - net/http_transport_libcurl.cc + ${HTTP_TRANSPORT_IMPL} linux/address_types.h linux/auxiliary_vector.cc linux/auxiliary_vector.h