From cba2f6c66ef27c992072afa79ebaae541814506b Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sun, 19 May 2024 07:07:04 +0800 Subject: 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 --------- Co-authored-by: ouwou <26526779+ouwou@users.noreply.github.com> --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 236dbd2..99cc9ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,9 @@ if (ENABLE_QRCODE_LOGIN) target_compile_definitions(abaddon PRIVATE WITH_QRLOGIN) endif () -target_precompile_headers(abaddon PRIVATE src/abaddon.hpp src/util.hpp) +if (NOT (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) + target_precompile_headers(abaddon PRIVATE 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) -- cgit v1.2.3 From 5b9d10a897f0e61f85ca4b2b70e95591a27eb81e Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:32:26 -0400 Subject: fix linking curl maybe somehow i guess --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 99cc9ef..526c8c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ endif () if (NOT (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) target_precompile_headers(abaddon PRIVATE src/abaddon.hpp src/util.hpp) -endif() +endif () if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND @@ -115,11 +115,12 @@ target_link_libraries(abaddon spdlog::spdlog) target_link_libraries(abaddon ${SQLite3_LIBRARIES}) target_link_libraries(abaddon ${GTKMM_LIBRARIES}) -target_link_libraries(abaddon ${CURL_LIBRARIES}) target_link_libraries(abaddon ${ZLIB_LIBRARY}) target_link_libraries(abaddon ${NLOHMANN_JSON_LIBRARIES}) target_link_libraries(abaddon ${CMAKE_DL_LIBS}) +target_link_libraries(abaddon CURL::libcurl) + include(CheckAtomic) if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB) target_link_libraries(abaddon atomic) -- cgit v1.2.3