summaryrefslogtreecommitdiffstats
path: root/deps/src/spdlog/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'deps/src/spdlog/CMakeLists.txt')
-rw-r--r--deps/src/spdlog/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/deps/src/spdlog/CMakeLists.txt b/deps/src/spdlog/CMakeLists.txt
new file mode 100644
index 0000000..8a10e27
--- /dev/null
+++ b/deps/src/spdlog/CMakeLists.txt
@@ -0,0 +1,22 @@
+add_library(spdlog STATIC
+ "${CMAKE_CURRENT_LIST_DIR}/async.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/bundled_fmtlib_format.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/cfg.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/color_sinks.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/file_sinks.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/spdlog.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/stdout_sinks.cpp")
+target_compile_definitions(spdlog PUBLIC SPDLOG_COMPILED_LIB)
+target_include_directories(spdlog PUBLIC "${DEPS_INCLUDE_DIR}")
+set_target_properties(spdlog PROPERTIES FOLDER DEPS)
+
+find_package(Threads REQUIRED)
+target_link_libraries(spdlog PUBLIC Threads::Threads)
+
+if(MSVC)
+ # There seems to be a compile-time check merged into the
+ # master fmtlib branch that has been pulled into spdlog as well
+ # that seems to fix an MSVC bug (https://github.com/fmtlib/fmt/pull/2297)
+ # FIXME: should I bundle fmtlib as a separate dependency?
+ target_compile_options(spdlog PUBLIC /utf-8)
+endif()