1
0
mirror of synced 2025-01-31 03:53:44 +01:00
ImHex/plugins/decompress/CMakeLists.txt

35 lines
926 B
CMake
Raw Normal View History

2023-12-24 13:14:51 +01:00
cmake_minimum_required(VERSION 3.16)
include(ImHexPlugin)
# Homebrew only ships a libarchive keg, include directories have to be set manually
2023-12-24 14:43:49 +01:00
find_package(LibArchive)
if (NOT DEFINED LibArchive_INCLUDE_DIR OR LibArchive_INCLUDE_DIR STREQUAL "")
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
execute_process(
COMMAND (${BREW_EXECUTABLE} --prefix libarchive) || exit 0
OUTPUT_VARIABLE LIBARCHIVE_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY
)
2023-12-24 13:57:21 +01:00
if (NOT LIBARCHIVE_PREFIX STREQUAL "")
set(LibArchive_INCLUDE_DIR "${LIBARCHIVE_PREFIX}/include")
endif()
2023-12-24 13:57:21 +01:00
endif()
endif()
2023-12-24 13:14:51 +01:00
add_imhex_plugin(
NAME
decompress
SOURCES
source/plugin_decompress.cpp
source/content/pl_functions.cpp
INCLUDES
include
LIBRARIES
ui
LibArchive::LibArchive
)