From f24bae0a18ae59b5937ceee6d466b928d5f4c65f Mon Sep 17 00:00:00 2001 From: Boyuan Yang Date: Mon, 8 Feb 2021 11:34:26 -0500 Subject: [PATCH] CMakeLists.txt: Add option to use external spdlog library (#1290) --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5aebd445..15b15b0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,14 @@ set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication") add_subdirectory(external/singleapplication) -add_subdirectory(external/spdlog) + +if(USE_EXTERNAL_SPDLOG) + find_package(spdlog REQUIRED) + message(STATUS "Using external spdlog library") +else() + add_subdirectory(external/spdlog) +endif() + IF (APPLE) add_subdirectory(external/QHotkey) ENDIF ()