Skip to content

Commit

Permalink
Merge pull request #7 from nshcat/win32-fixes
Browse files Browse the repository at this point in the history
Fixed logging library not being compiled as shared lib on Win32
  • Loading branch information
azonenberg authored Jun 22, 2020
2 parents d27a7bd + 27fc278 commit cd2aab8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# CMake build script for logtools.
# Intended to be integrated into a larger project, not built standalone.

if(WIN32)
add_library(log SHARED
log.cpp
ColoredSTDLogSink.cpp
STDLogSink.cpp
FILELogSink.cpp)
else()
add_library(log STATIC
log.cpp
ColoredSTDLogSink.cpp
STDLogSink.cpp
FILELogSink.cpp)
endif()

target_include_directories(log
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

0 comments on commit cd2aab8

Please sign in to comment.