From 78419dbce1a176ab60bd2f46ba6fb2add180832c Mon Sep 17 00:00:00 2001 From: WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> Date: Sat, 19 Dec 2020 18:17:06 +0000 Subject: 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. --- src/frontend/qt_sdl/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/frontend/qt_sdl/CMakeLists.txt') 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)) -- cgit v1.2.3