mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
Copy dlls to the executable folder for msvc
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Copyright(c) 2019 spdlog authors Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
|
||||
cmake_minimum_required(VERSION 3.11)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(spdlog_example CXX)
|
||||
|
||||
if(NOT TARGET spdlog)
|
||||
@@ -11,8 +11,8 @@ endif()
|
||||
add_executable(example example.cpp)
|
||||
target_link_libraries(example PRIVATE spdlog::spdlog $<$<BOOL:${MINGW}>:ws2_32>)
|
||||
|
||||
# copy dll to the executable folder for msvc
|
||||
# copy dlls to the executable folder for msvc
|
||||
if(MSVC AND (SPDLOG_BUILD_SHARED OR BUILD_SHARED_LIBS))
|
||||
add_custom_command(TARGET example POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:spdlog>
|
||||
$<TARGET_FILE_DIR:example>)
|
||||
add_custom_command(TARGET example POST_BUILD COMMAND ${CMAKE_COMMAND}
|
||||
-E copy_if_different $<TARGET_FILE:spdlog> $<TARGET_FILE:fmt> $<TARGET_FILE_DIR:example>)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user