build: Only fix libarchive include dirs when necessary
This commit is contained in:
parent
24f8ce9d7f
commit
7eb92c68de
@ -3,9 +3,8 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
include(ImHexPlugin)
|
include(ImHexPlugin)
|
||||||
|
|
||||||
# Homebrew only ships a libarchive keg, include directories have to be set manually
|
# Homebrew only ships a libarchive keg, include directories have to be set manually
|
||||||
if (APPLE)
|
find_package(LibArchive REQUIRED)
|
||||||
find_package(Brew QUIET)
|
if (APPLE AND LibArchive_INCLUDE_DIR STREQUAL "")
|
||||||
if (Brew_FOUND)
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND (${BREW_EXECUTABLE} --prefix libarchive) || exit 0
|
COMMAND (${BREW_EXECUTABLE} --prefix libarchive) || exit 0
|
||||||
OUTPUT_VARIABLE LIBARCHIVE_PREFIX
|
OUTPUT_VARIABLE LIBARCHIVE_PREFIX
|
||||||
@ -17,8 +16,6 @@ if (APPLE)
|
|||||||
set(LibArchive_INCLUDE_DIR "${LIBARCHIVE_PREFIX}/include")
|
set(LibArchive_INCLUDE_DIR "${LIBARCHIVE_PREFIX}/include")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
find_package(LibArchive REQUIRED)
|
|
||||||
|
|
||||||
add_imhex_plugin(
|
add_imhex_plugin(
|
||||||
NAME
|
NAME
|
||||||
|
Loading…
x
Reference in New Issue
Block a user