diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 54c3bf41..d3f46ed2 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -75,6 +75,20 @@ endif () # spdlog target_link_libraries(gpgfrontend_core PRIVATE spdlog) + +# configure libarchive +if(NOT MINGW) + if(APPLE) + if(EXISTS "/usr/local/opt/libarchive/include") + set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include") + else() + set(LibArchive_INCLUDE_DIR "/opt/homebrew/opt/libarchive/include") + endif() + endif() + find_package(LibArchive REQUIRED) + target_include_directories(gpgfrontend_core PRIVATE ${LibArchive_INCLUDE_DIR}) +endif() + # link libarchive target_link_libraries(gpgfrontend_core PRIVATE archive) |