forked from puppetlabs-toy-chest/leatherman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
29 lines (23 loc) · 1006 Bytes
/
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
find_package(Boost 1.54 REQUIRED COMPONENTS log log_setup thread date_time filesystem system chrono regex)
find_package(Threads)
add_leatherman_deps(${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
add_leatherman_includes("${Boost_INCLUDE_DIRS}")
leatherman_dependency(nowide)
leatherman_dependency(locale)
if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "SunOS")
add_leatherman_deps(rt)
endif()
if (BUILDING_LEATHERMAN)
leatherman_logging_namespace("leatherman.logging")
leatherman_logging_line_numbers()
endif()
if(WIN32)
set(PLATFORM_SRCS "src/windows/logging.cc")
set(PLATFORM_TEST_SRCS "tests/windows/logging.cc")
else()
set(PLATFORM_SRCS "src/posix/logging.cc")
set(PLATFORM_TEST_SRCS "tests/posix/logging.cc")
endif()
add_leatherman_library(src/logging.cc ${PLATFORM_SRCS})
add_leatherman_test(tests/logging.cc tests/logging_sink.cc tests/logging_stream.cc tests/logging_stream_lines.cc ${PLATFORM_TEST_SRCS})
add_leatherman_headers(inc/leatherman)