summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2021-01-19 15:49:30 +0100
committerEike Ziller <eike.ziller@qt.io>2021-01-20 15:26:03 +0000
commit44901a38634b34041a7f7d14f68679d7b8e2a252 (patch)
treee5043270ee68703c853050a30fc719bf48bb5a37 /CMakeLists.txt
parentacdb16dd4a32c0e7bdc4ad0003c757487a718f0c (diff)
downloadqt-creator-44901a38634b34041a7f7d14f68679d7b8e2a252.tar.gz
Find Crashpad via CMake configuration
Makes it possible to point CMake to crashpad via CMAKE_PREFIX_PATH if it was built to <crashpad>/out/Default, or by setting individual CRASHPAD_* variables to the sources and build results. Change-Id: I9634fe7ab8c1e14b7e0f3ccf3415396c8dc1e71a Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc4b66829a..b23103fdff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,6 +55,17 @@ find_package(Threads)
find_package(Clang QUIET)
find_package(KF5SyntaxHighlighting QUIET)
+# Crashpad
+set(CRASHPAD_BACKEND_URL "" CACHE STRING "Crashpad backend URL")
+set(BUILD_WITH_CRASHPAD OFF)
+if(CRASHPAD_BACKEND_URL AND (WIN32 OR APPLE)) # Linux is not supported for now
+ find_package(Crashpad QUIET)
+ if(TARGET Crashpad::Crashpad)
+ set(BUILD_WITH_CRASHPAD ON)
+ endif()
+endif()
+add_feature_info("Build with Crashpad" ${BUILD_WITH_CRASHPAD} "")
+
function (set_if_target var target)
if (TARGET "${target}")
set(_result ON)