-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (55 loc) · 1.6 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 3.10)
project(wlog VERSION "0.9.8")
include(cmake/ci.cmake)
set(
source_list
wlog/global/global_log.cpp
wlog/global/logstream.cpp
wlog/global/stdstream.cpp
wlog/init.cpp
wlog/formatter/formatter.cpp
wlog/formatter/formatter_options.cpp
wlog/formatter/formatter_handlers.cpp
wlog/writer/file_writer.cpp
wlog/writer/file_writer_options.cpp
wlog/writer/stdout_writer.cpp
wlog/writer/stdout_writer_options.cpp
wlog/writer/syslog_writer.cpp
wlog/writer/syslog_writer_options.cpp
wlog/logger/default_logger.cpp
wlog/logger/file_logger_options.cpp
wlog/logger/stdout_logger_options.cpp
wlog/logger/syslog_logger_options.cpp
wlog/logger/basic_logger_options.cpp
wlog/logger/custom_logger_options.cpp
wlog/logger/logger_options.cpp
wlog/logger/basic_logger_handlers.cpp
wlog/logger/logger_handlers.cpp
wlog/aux/aux.cpp
wlog/aux/strftime.cpp
)
if (NOT WLOG_DISABLE_JSON)
wci_submodule(NAME faslib)
wci_submodule(NAME wjson)
list(APPEND source_list wlog/load.cpp )
endif()
if ( NOT MSVC )
set_source_files_properties(wlog/aux/strftime.cpp PROPERTIES COMPILE_FLAGS -fno-builtin-strftime)
endif()
add_library(wlog ${source_list} )
target_include_directories(wlog PUBLIC $<BUILD_INTERFACE:${wlog_SOURCE_DIR}> )
if (NOT WLOG_DISABLE_JSON)
target_link_libraries(wlog PUBLIC faslib wjson)
endif()
wci_targets(wlog)
if ( BUILD_TESTING )
if (WLOG_DISABLE_JSON)
wci_submodule(NAME faslib)
endif()
enable_testing()
add_subdirectory(tests)
if ( WITH_SAMPLES )
add_subdirectory(examples)
endif()
endif()
include(cmake/install.cmake)