From 74fb3a90b5a737474f03986e5a026d0a464b2229 Mon Sep 17 00:00:00 2001 From: zEuS0390 Date: Sun, 12 Feb 2023 10:10:18 +0800 Subject: [PATCH] Move the cmake change to example\CMakeLists.txt --- CMakeLists.txt | 4 ++-- example/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a276a73..3389c04b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,7 +179,7 @@ endif() target_compile_definitions(spdlog PUBLIC SPDLOG_COMPILED_LIB) target_include_directories(spdlog ${SPDLOG_INCLUDES_LEVEL} PUBLIC "$" "$") -target_link_libraries(spdlog PUBLIC Threads::Threads $<$: ws2_32>) +target_link_libraries(spdlog PUBLIC Threads::Threads) spdlog_enable_warnings(spdlog) set_target_properties(spdlog PROPERTIES VERSION ${SPDLOG_VERSION} SOVERSION ${SPDLOG_VERSION_MAJOR}.${SPDLOG_VERSION_MINOR}) @@ -198,7 +198,7 @@ add_library(spdlog::spdlog_header_only ALIAS spdlog_header_only) target_include_directories(spdlog_header_only ${SPDLOG_INCLUDES_LEVEL} INTERFACE "$" "$") -target_link_libraries(spdlog_header_only INTERFACE Threads::Threads $<$: ws2_32>) +target_link_libraries(spdlog_header_only INTERFACE Threads::Threads) # --------------------------------------------------------------------------------------- # Use fmt package if using external fmt diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 83336e98..a25f15d9 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -12,7 +12,7 @@ endif() # Example of using pre-compiled library # --------------------------------------------------------------------------------------- add_executable(example example.cpp) -target_link_libraries(example PRIVATE spdlog::spdlog) +target_link_libraries(example PRIVATE spdlog::spdlog $<$:ws2_32>) # --------------------------------------------------------------------------------------- # Example of using header-only library