aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/CMakeLists.txt
diff options
context:
space:
mode:
authorWaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com>2020-12-19 18:17:06 +0000
committerGitHub <noreply@github.com>2020-12-19 18:17:06 +0000
commit78419dbce1a176ab60bd2f46ba6fb2add180832c (patch)
treee18d0ac564728ed6a9a72e4e8eebe16a841ab95d /src/frontend/qt_sdl/CMakeLists.txt
parent6b8738bb6041ea0ac88aa9c3ff04115c3210ddc7 (diff)
Allow pkg-config to find libarchive on macOS
macOS already provides the libarchive libraries, so Homebrew doesn't link it. However, macOS does not provide the headers.
Diffstat (limited to 'src/frontend/qt_sdl/CMakeLists.txt')
-rw-r--r--src/frontend/qt_sdl/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt
index 865acca..add53c2 100644
--- a/src/frontend/qt_sdl/CMakeLists.txt
+++ b/src/frontend/qt_sdl/CMakeLists.txt
@@ -53,6 +53,12 @@ find_package(PkgConfig REQUIRED)
find_package(Iconv REQUIRED)
pkg_check_modules(SDL2 REQUIRED sdl2)
pkg_check_modules(SLIRP REQUIRED slirp)
+
+if (APPLE)
+ execute_process(COMMAND brew --prefix libarchive
+ OUTPUT_VARIABLE LIBARCHIVE_DIR)
+ set(CMAKE_PREFIX_PATH "${LIBARCHIVE_DIR}/lib/pkgconfig")
+endif()
pkg_check_modules(LIBARCHIVE REQUIRED libarchive)
if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL Release))