diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
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 () |