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

fix: further dependency use/export cleanup #106

Merged
merged 1 commit into from
Jun 24, 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: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ else()
endif()
option(CRASHPAD_ZLIB_SYSTEM "Use system zlib library" "${CRASHPAD_ZLIB_SYSTEM_DEFAULT}")

if(CRASHPAD_ZLIB_SYSTEM AND NOT ZLIB_FOUND)
if(CRASHPAD_ZLIB_SYSTEM AND NOT TARGET ZLIB::ZLIB)
find_package(ZLIB REQUIRED)
endif()

Expand Down
11 changes: 5 additions & 6 deletions crashpad-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
include("${CMAKE_CURRENT_LIST_DIR}/crashpad-targets.cmake")

include(CMakeFindDependencyMacro)

if(@CRASHPAD_ZLIB_SYSTEM@)
find_dependency(ZLIB REQUIRED)
include(CMakeFindDependencyMacro)
find_dependency(ZLIB)
target_include_directories(crashpad::zlib INTERFACE ${ZLIB_INCLUDE_DIRS})
target_compile_definitions(crashpad::zlib INTERFACE ${ZLIB_COMPILE_DEFINITIONS})
target_link_libraries(crashpad::zlib INTERFACE ${ZLIB_LIBRARIES})
endif()

@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/crashpad-targets.cmake")

@PACKAGE_INIT@
2 changes: 1 addition & 1 deletion util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ endif()

if(LINUX OR ANDROID)
if (LINUX)
if(NOT CURL_FOUND) # Some other lib might bring libcurl already
if(NOT TARGET CURL::libcurl) # Some other lib might bring libcurl already
find_package(CURL REQUIRED)
endif()

Expand Down