Fix-ups for macOS (#291)

* Do not use precomp headers target with GCC on Apple

* CMakeLists: also link to AudioUnit on Apple

* platform.cpp: add missing <unistd.h>

---------

Co-authored-by: ouwou <26526779+ouwou@users.noreply.github.com>
This commit is contained in:
Sergey Fedorovandouwou authored and GitHub committed 2024-05-18 19:07:04 -04:00
1 parent ada3420dce
commit cba2f6c66e
2 files changed
+8 -1

No files matched your search

+4 -1
View File
@@ -66,7 +66,9 @@ if (ENABLE_QRCODE_LOGIN)
target_compile_definitions(abaddon PRIVATE WITH_QRLOGIN)
endif ()
target_precompile_headers(abaddon PRIVATE <gtkmm.h> src/abaddon.hpp src/util.hpp)
if (NOT (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
target_precompile_headers(abaddon PRIVATE <gtkmm.h> src/abaddon.hpp src/util.hpp)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
@@ -146,6 +148,7 @@ if (APPLE)
target_link_libraries(abaddon "-framework CoreFoundation")
target_link_libraries(abaddon "-framework CoreAudio")
target_link_libraries(abaddon "-framework AudioToolbox")
target_link_libraries(abaddon "-framework AudioUnit")
endif ()
if (ENABLE_VOICE)
+4
View File
@@ -4,6 +4,10 @@
#include <fstream>
#include <string>
#ifdef __APPLE__
#include <unistd.h>
#endif
#include <spdlog/spdlog.h>
using namespace std::literals::string_literals;