2023-05-10 00:05:38 +02:00
|
|
|
cmake_minimum_required( VERSION 3.16 )
|
2023-06-17 00:45:27 +02:00
|
|
|
add_module( "lib" "libspdlog" "" ${FOLDER_CONTEXT} TRUE TRUE )
|
2023-05-10 00:05:38 +02:00
|
|
|
|
|
|
|
start_sources()
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Source"
|
|
|
|
"src/async.cpp"
|
|
|
|
"src/bundled_fmtlib_format.cpp"
|
|
|
|
"src/cfg.cpp"
|
|
|
|
"src/color_sinks.cpp"
|
|
|
|
"src/file_sinks.cpp"
|
|
|
|
"src/spdlog.cpp"
|
|
|
|
"src/stdout_sinks.cpp"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Include"
|
|
|
|
"async.h"
|
|
|
|
"async_logger-inl.h"
|
|
|
|
"async_logger.h"
|
|
|
|
"common-inl.h"
|
|
|
|
"common.h"
|
|
|
|
"formatter.h"
|
|
|
|
"fwd.h"
|
|
|
|
"logger-inl.h"
|
|
|
|
"logger.h"
|
|
|
|
"pattern_formatter-inl.h"
|
|
|
|
"pattern_formatter.h"
|
|
|
|
"spdlog-inl.h"
|
|
|
|
"spdlog.h"
|
|
|
|
"stopwatch.h"
|
|
|
|
"tweakme.h"
|
|
|
|
"version.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "CFG"
|
|
|
|
"cfg/argv.h"
|
|
|
|
"cfg/env.h"
|
|
|
|
"cfg/helpers-inl.h"
|
|
|
|
"cfg/helpers.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Details"
|
|
|
|
"details/backtracer-inl.h"
|
|
|
|
"details/backtracer.h"
|
|
|
|
"details/circular_q.h"
|
|
|
|
"details/console_globals.h"
|
|
|
|
"details/file_helper-inl.h"
|
|
|
|
"details/file_helper.h"
|
|
|
|
"details/fmt_helper.h"
|
|
|
|
"details/log_msg-inl.h"
|
|
|
|
"details/log_msg.h"
|
|
|
|
"details/log_msg_buffer-inl.h"
|
|
|
|
"details/log_msg_buffer.h"
|
|
|
|
"details/mpmc_blocking_q.h"
|
|
|
|
"details/null_mutex.h"
|
|
|
|
"details/os-inl.h"
|
|
|
|
"details/os.h"
|
|
|
|
"details/periodic_worker-inl.h"
|
|
|
|
"details/periodic_worker.h"
|
|
|
|
"details/registry-inl.h"
|
|
|
|
"details/registry.h"
|
|
|
|
"details/synchronous_factory.h"
|
|
|
|
"details/tcp_client-windows.h"
|
|
|
|
"details/tcp_client.h"
|
|
|
|
"details/thread_pool-inl.h"
|
|
|
|
"details/thread_pool.h"
|
|
|
|
"details/udp_client-windows.h"
|
|
|
|
"details/udp_client.h"
|
|
|
|
"details/windows_include.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "FMT"
|
|
|
|
"fmt/bin_to_hex.h"
|
|
|
|
"fmt/chrono.h"
|
|
|
|
"fmt/compile.h"
|
|
|
|
"fmt/fmt.h"
|
|
|
|
"fmt/ostr.h"
|
|
|
|
"fmt/ranges.h"
|
|
|
|
"fmt/xchar.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "FMT/Bundled"
|
|
|
|
"fmt/bundled/args.h"
|
|
|
|
"fmt/bundled/chrono.h"
|
|
|
|
"fmt/bundled/color.h"
|
|
|
|
"fmt/bundled/compile.h"
|
|
|
|
"fmt/bundled/core.h"
|
|
|
|
"fmt/bundled/fmt.license.rst"
|
|
|
|
"fmt/bundled/format-inl.h"
|
|
|
|
"fmt/bundled/format.h"
|
|
|
|
"fmt/bundled/locale.h"
|
|
|
|
"fmt/bundled/os.h"
|
|
|
|
"fmt/bundled/ostream.h"
|
|
|
|
"fmt/bundled/printf.h"
|
|
|
|
"fmt/bundled/ranges.h"
|
|
|
|
"fmt/bundled/xchar.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Sinks"
|
|
|
|
"sinks/android_sink.h"
|
|
|
|
"sinks/ansicolor_sink-inl.h"
|
|
|
|
"sinks/ansicolor_sink.h"
|
|
|
|
"sinks/base_sink-inl.h"
|
|
|
|
"sinks/base_sink.h"
|
|
|
|
"sinks/basic_file_sink-inl.h"
|
|
|
|
"sinks/basic_file_sink.h"
|
|
|
|
"sinks/daily_file_sink.h"
|
|
|
|
"sinks/dist_sink.h"
|
|
|
|
"sinks/dup_filter_sink.h"
|
|
|
|
"sinks/hourly_file_sink.h"
|
|
|
|
"sinks/mongo_sink.h"
|
|
|
|
"sinks/msvc_sink.h"
|
|
|
|
"sinks/null_sink.h"
|
|
|
|
"sinks/ostream_sink.h"
|
|
|
|
"sinks/qt_sinks.h"
|
|
|
|
"sinks/ringbuffer_sink.h"
|
|
|
|
"sinks/rotating_file_sink-inl.h"
|
|
|
|
"sinks/rotating_file_sink.h"
|
|
|
|
"sinks/sink-inl.h"
|
|
|
|
"sinks/sink.h"
|
|
|
|
"sinks/stdout_color_sinks-inl.h"
|
|
|
|
"sinks/stdout_color_sinks.h"
|
|
|
|
"sinks/stdout_sinks-inl.h"
|
|
|
|
"sinks/stdout_sinks.h"
|
|
|
|
"sinks/syslog_sink.h"
|
|
|
|
"sinks/systemd_sink.h"
|
|
|
|
"sinks/tcp_sink.h"
|
|
|
|
"sinks/udp_sink.h"
|
|
|
|
"sinks/win_eventlog_sink.h"
|
|
|
|
"sinks/wincolor_sink-inl.h"
|
|
|
|
"sinks/wincolor_sink.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
end_sources()
|
2023-05-13 11:57:57 +02:00
|
|
|
whole_program_optimization()
|
2023-05-15 09:44:26 +02:00
|
|
|
thirdparty_suppress_warnings()
|
2023-05-13 11:57:57 +02:00
|
|
|
|
2023-05-10 00:05:38 +02:00
|
|
|
target_compile_definitions( ${PROJECT_NAME} PRIVATE
|
|
|
|
"SPDLOG_COMPILED_LIB"
|
|
|
|
"SPDLOG_NO_EXCEPTIONS"
|
|
|
|
)
|