Updated cmakelists.txt

This commit is contained in:
gabime
2024-12-01 18:22:06 +02:00
parent 65a2d8a49f
commit dcf664ee1d
2 changed files with 37 additions and 32 deletions

View File

@@ -3,10 +3,7 @@
cmake_minimum_required(VERSION 3.14)
project(spdlog_example CXX)
if(NOT TARGET spdlog)
# Stand-alone build
find_package(spdlog REQUIRED)
endif()
find_package(spdlog REQUIRED)
add_executable(example example.cpp)
target_link_libraries(example PRIVATE spdlog::spdlog $<$<BOOL:${MINGW}>:ws2_32>)
target_link_libraries(example PRIVATE spdlog $<$<BOOL:${MINGW}>:ws2_32>)