diff options
author | Saturneric <[email protected]> | 2023-10-18 13:53:16 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-10-18 13:53:16 +0000 |
commit | edf86e2e65ac2cbcde73fa0afe31a1bf5150eb38 (patch) | |
tree | 72cbe2826336440357bcb4d48636c826e05daee9 /src | |
parent | feat: simplify the thread system and improve its stability (diff) | |
download | GpgFrontend-edf86e2e65ac2cbcde73fa0afe31a1bf5150eb38.tar.gz GpgFrontend-edf86e2e65ac2cbcde73fa0afe31a1bf5150eb38.zip |
fix: solve build issues on macOS
Diffstat (limited to '')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/core/CMakeLists.txt | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4182b764..f828b763 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,6 +33,10 @@ else() PATHS ${BOOST_ROOT} NO_DEFAULT_PATH) endif() +if(APPLE) + add_compile_definitions("_GNU_SOURCE") +endif() + # Introduce GpgME find_package(Gpgme REQUIRED) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index bd0c28b3..c8edc8d7 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -81,7 +81,11 @@ endif () target_link_libraries(gpgfrontend_core PRIVATE spdlog) # link libarchive +if(APPLE) + set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include") +endif() find_package(LibArchive REQUIRED) +target_include_directories(gpgfrontend_core PRIVATE ${LibArchive_INCLUDE_DIR}) target_link_libraries(gpgfrontend_core PRIVATE archive) # link json |