Fix MinGW build issue on example (#2642)

* Fix MinGW build issue on example #2638

* Move the cmake change to example\CMakeLists.txt

* Update CMakeLists.txt on the example
This commit is contained in:
Zeus James
2023-02-12 16:34:22 +08:00
committed by GitHub
parent 927cc29444
commit da14258533
3 changed files with 7 additions and 6 deletions

View File

@@ -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 $<$<BOOL:${MINGW}>:ws2_32>)
# ---------------------------------------------------------------------------------------
# Example of using header-only library