Browse Source

CMakeLists.txt: Add option to use external spdlog library (#1290)

Boyuan Yang 4 years ago
parent
commit
f24bae0a18
1 changed files with 8 additions and 1 deletions
  1. 8 1
      CMakeLists.txt

+ 8 - 1
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 ()