summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-12-18 20:52:19 +0000
committerGitHub <noreply@github.com>2022-12-18 20:52:19 +0000
commitacb03642c2b56260e406ffbba6ef91b74fcf9eef (patch)
treeadb88e874c51fa350382c4a217322d71b9513177 /CMakeLists.txt
parentc704703b14d7934c079b39b9225ae803cc48cb70 (diff)
parentba2aea86f9221a2126fb1434e31c05a2381286d2 (diff)
downloadabaddon-portaudio-acb03642c2b56260e406ffbba6ef91b74fcf9eef.tar.gz
abaddon-portaudio-acb03642c2b56260e406ffbba6ef91b74fcf9eef.zip
Merge pull request #124 from uowuo/keychain
store token in keychain
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e28791..0a9e17a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
option(USE_LIBHANDY "Enable features that require libhandy (default)" ON)
+option(USE_KEYCHAIN "Store the token in the keychain (default)" ON)
find_package(nlohmann_json REQUIRED)
find_package(CURL)
@@ -106,3 +107,13 @@ if (USE_LIBHANDY)
target_compile_definitions(abaddon PRIVATE WITH_LIBHANDY)
endif ()
endif ()
+
+if (USE_KEYCHAIN)
+ find_package(keychain QUIET)
+ if (NOT keychain_FOUND)
+ message("keychain was not found and will be included as a submodule")
+ add_subdirectory(subprojects/keychain)
+ target_link_libraries(abaddon keychain)
+ target_compile_definitions(abaddon PRIVATE WITH_KEYCHAIN)
+ endif ()
+endif ()