Skip to content

Commit 433ed68

Browse files
authored
update build-script for transport-compression changes in sentry-native (#97)
1 parent 58d7207 commit 433ed68

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else()
2121
endif()
2222
option(CRASHPAD_ZLIB_SYSTEM "Use system zlib library" "${CRASHPAD_ZLIB_SYSTEM_DEFAULT}")
2323

24-
if(CRASHPAD_ZLIB_SYSTEM)
24+
if(CRASHPAD_ZLIB_SYSTEM AND NOT ZLIB_FOUND)
2525
find_package(ZLIB REQUIRED)
2626
endif()
2727

util/CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,7 @@ if(LINUX OR ANDROID)
253253
find_package(CURL REQUIRED)
254254
endif()
255255

256-
if(TARGET CURL::libcurl) # Only available in cmake 3.12+
257-
target_link_libraries(crashpad_util PRIVATE CURL::libcurl)
258-
else()
259-
# Needed for cmake < 3.12 support (cmake 3.12 introduced the target CURL::libcurl)
260-
target_include_directories(crashpad_util PRIVATE ${CURL_INCLUDE_DIR})
261-
# The exported sentry target must not contain any path of the build machine, therefore use generator expressions
262-
string(REPLACE ";" "$<SEMICOLON>" GENEX_CURL_LIBRARIES "${CURL_LIBRARIES}")
263-
string(REPLACE ";" "$<SEMICOLON>" GENEX_CURL_COMPILE_DEFINITIONS "${CURL_COMPILE_DEFINITIONS}")
264-
target_link_libraries(crashpad_util PRIVATE $<BUILD_INTERFACE:${GENEX_CURL_LIBRARIES}>)
265-
target_compile_definitions(crashpad_util PRIVATE $<BUILD_INTERFACE:${GENEX_CURL_COMPILE_DEFINITIONS}>)
266-
endif()
267-
256+
target_link_libraries(crashpad_util PRIVATE CURL::libcurl)
268257
SET(HTTP_TRANSPORT_IMPL net/http_transport_libcurl.cc)
269258
else()
270259
find_package(OpenSSL)

0 commit comments

Comments
 (0)