From ff5009bf54b4a0a8abf604b69cc4f3314d9a003d Mon Sep 17 00:00:00 2001 From: Fredrik Appelros Date: Mon, 7 Jan 2019 12:26:28 +0100 Subject: [PATCH] Add missing Linux dependencies The Linux client of breakpad requires the gflags and glog libraries and hence those packages needs to be added to Linux builds. --- CMakeLists.txt | 7 +++++++ cmake/config.cmake.in | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6af62098d..18af55919 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,6 +216,13 @@ target_include_directories(libbreakpad_client $ $ ) +if(NOT WIN32 AND NOT APPLE) + hunter_add_package(gflags) + hunter_add_package(glog) + find_package(gflags CONFIG REQUIRED) + find_package(glog CONFIG REQUIRED) + target_link_libraries(libbreakpad_client PUBLIC gflags glog::glog) +endif() install( diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in index 9b4c9ee03..2e6c3767a 100644 --- a/cmake/config.cmake.in +++ b/cmake/config.cmake.in @@ -2,3 +2,10 @@ include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") check_required_components("@PROJECT_NAME@") + +include(CMakeFindDependencyMacro) + +if(NOT "@WIN32@" AND NOT "@APPLE@") + find_dependency(gflags) + find_dependency(glog) +endif()