From 294800645e5f50fb7ef2f1e4dbb69658b0d64a60 Mon Sep 17 00:00:00 2001 From: yunfeng Date: Wed, 10 Nov 2021 12:52:26 +0800 Subject: [PATCH] build(cmake): set include path for LibArchive on macOS Homebrew installs LibArchive in a non-standard location. Fixes #1364. Related to #1365 and #1368. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74b1818..f1655f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,11 @@ project(Zeal VERSION 0.6.2) # NOTE: Don't forget to add a new release entry in the AppStream metadata! set(RELEASE_VERSION FALSE) +# Set LibArchive_INCLUDE_DIR to unstandard path. Reduce the error rate +if(APPLE AND NOT LibArchive_INCLUDE_DIR) + set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include") +endif() + # Project information. if(APPLE) set(PROJECT_OUTPUT_NAME "Zeal")