mirror of https://github.com/WerWolv/ImHex.git
build: Try different libarchive include path detection method
This commit is contained in:
parent
3bb079216c
commit
9952854b53
|
@ -4,7 +4,8 @@ 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
|
||||||
find_package(LibArchive REQUIRED)
|
find_package(LibArchive REQUIRED)
|
||||||
if (APPLE AND LibArchive_INCLUDE_DIR STREQUAL "")
|
if (NOT DEFINED LibArchive_INCLUDE_DIR OR LibArchive_INCLUDE_DIR STREQUAL "")
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||||
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
|
||||||
|
@ -15,6 +16,7 @@ if (APPLE AND LibArchive_INCLUDE_DIR STREQUAL "")
|
||||||
if (NOT LIBARCHIVE_PREFIX STREQUAL "")
|
if (NOT LIBARCHIVE_PREFIX STREQUAL "")
|
||||||
set(LibArchive_INCLUDE_DIR "${LIBARCHIVE_PREFIX}/include")
|
set(LibArchive_INCLUDE_DIR "${LIBARCHIVE_PREFIX}/include")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_imhex_plugin(
|
add_imhex_plugin(
|
||||||
|
|
Loading…
Reference in New Issue