File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,6 @@ if(SPDLOG_SYSTEM_INCLUDES)
176
176
set (SPDLOG_INCLUDES_LEVEL "SYSTEM" )
177
177
endif ()
178
178
179
-
180
179
target_compile_definitions (spdlog PUBLIC SPDLOG_COMPILED_LIB)
181
180
target_include_directories (spdlog ${SPDLOG_INCLUDES_LEVEL} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR} /include>"
182
181
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >" )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ endif()
12
12
# Example of using pre-compiled library
13
13
# ---------------------------------------------------------------------------------------
14
14
add_executable (example example.cpp)
15
- target_link_libraries (example PRIVATE spdlog::spdlog)
15
+ target_link_libraries (example PRIVATE spdlog::spdlog $<$< BOOL : ${MINGW} >:ws2_32> )
16
16
17
17
# ---------------------------------------------------------------------------------------
18
18
# Example of using header-only library
Original file line number Diff line number Diff line change 15
15
#include < stdio.h>
16
16
#include < string>
17
17
18
- #pragma comment(lib, "Ws2_32.lib")
19
- #pragma comment(lib, "Mswsock.lib")
20
- #pragma comment(lib, "AdvApi32.lib")
18
+ #if defined(_MSC_VER)
19
+ # pragma comment(lib, "Ws2_32.lib")
20
+ # pragma comment(lib, "Mswsock.lib")
21
+ # pragma comment(lib, "AdvApi32.lib")
22
+ #endif
21
23
22
24
namespace spdlog {
23
25
namespace details {
24
26
class udp_client
25
27
{
26
28
static constexpr int TX_BUFFER_SIZE = 1024 * 10 ;
27
29
SOCKET socket_ = INVALID_SOCKET;
28
- sockaddr_in addr_ = {0 };
30
+ sockaddr_in addr_ = {};
29
31
30
32
static void init_winsock_ ()
31
33
{
You can’t perform that action at this time.
0 commit comments