summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-07-17 21:37:24 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2023-07-17 21:37:24 -0400
commitd04e101800c451c4963a530b7cf745666105cec4 (patch)
treed73fdf97b00d8f40d8888de762574a424df435eb /CMakeLists.txt
parent0f3814586e3949d1a7fc15bfc2aff2b99d4975a8 (diff)
parent857e94af3817932b78963873fb5621ae3c4596f7 (diff)
downloadabaddon-portaudio-d04e101800c451c4963a530b7cf745666105cec4.tar.gz
abaddon-portaudio-d04e101800c451c4963a530b7cf745666105cec4.zip
Merge branch 'master' into rnnoise
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 22 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6bdacc8..ab51f67 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,7 @@ option(ENABLE_VOICE "Enable voice suppport" ON)
option(USE_KEYCHAIN "Store the token in the keychain (default)" ON)
option(ENABLE_NOTIFICATION_SOUNDS "Enable notification sounds (default)" ON)
option(ENABLE_RNNOISE "Enable RNNoise for voice activity detection (default)" ON)
+option(ENABLE_QRCODE_LOGIN "Enable QR code login (default)" ON)
find_package(nlohmann_json REQUIRED)
find_package(CURL)
@@ -62,6 +63,15 @@ target_include_directories(abaddon PUBLIC ${ZLIB_INCLUDE_DIRS})
target_include_directories(abaddon PUBLIC ${SQLite3_INCLUDE_DIRS})
target_include_directories(abaddon PUBLIC ${NLOHMANN_JSON_INCLUDE_DIRS})
+if (ENABLE_QRCODE_LOGIN)
+ add_library(qrcodegen subprojects/qrcodegen/cpp/qrcodegen.hpp subprojects/qrcodegen/cpp/qrcodegen.cpp)
+ target_include_directories(qrcodegen PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/subprojects/qrcodegen/cpp")
+ target_link_libraries(abaddon qrcodegen)
+
+ target_include_directories(abaddon PUBLIC "subprojects/qrcodegen/cpp")
+ target_compile_definitions(abaddon PRIVATE WITH_QRLOGIN)
+endif ()
+
target_precompile_headers(abaddon PRIVATE <gtkmm.h> src/abaddon.hpp src/util.hpp)
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
@@ -180,6 +190,12 @@ if (ENABLE_VOICE)
target_link_libraries(abaddon rnnoise)
endif ()
endif ()
+
+ if (APPLE)
+ target_link_libraries(abaddon "-framework CoreFoundation")
+ target_link_libraries(abaddon "-framework CoreAudio")
+ target_link_libraries(abaddon "-framework AudioToolbox")
+ endif ()
endif ()
if (${ENABLE_NOTIFICATION_SOUNDS})
@@ -188,6 +204,11 @@ if (${ENABLE_NOTIFICATION_SOUNDS})
endif ()
if (USE_MINIAUDIO)
- target_include_directories(abaddon PUBLIC subprojects/miniaudio)
+ find_path(MINIAUDIO_INCLUDE_DIR
+ NAMES miniaudio.h
+ HINTS subprojects
+ PATH_SUFFIXES miniaudio
+ REQUIRED)
+ target_include_directories(abaddon PUBLIC ${MINIAUDIO_INCLUDE_DIR})
target_compile_definitions(abaddon PRIVATE WITH_MINIAUDIO)
endif ()