blob: 8a10e2785e62efefe623d4cf1efc9817ff913a97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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()
|