Skip to content

Commit 4a7e1d1

Browse files
committed
Fix
1 parent f9d53a8 commit 4a7e1d1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,26 @@ cmake_minimum_required(VERSION 3.28)
33
set(test_target "test_sparrow_ipc_lib")
44

55
add_executable(${test_target} main.cpp test_primitive_array.cpp test_utils.cpp)
6+
67
target_link_libraries(${test_target}
78
PRIVATE
89
sparrow-ipc
910
doctest::doctest
1011
)
12+
13+
if(WIN32)
14+
add_custom_command(
15+
TARGET ${test_target} POST_BUILD
16+
COMMAND ${CMAKE_COMMAND} -E copy
17+
"$<TARGET_FILE:sparrow>"
18+
"$<TARGET_FILE_DIR:${test_target}>"
19+
COMMAND ${CMAKE_COMMAND} -E copy
20+
"$<TARGET_FILE:sparrow-ipc>"
21+
"$<TARGET_FILE_DIR:${test_target}>"
22+
COMMENT "Copying sparrow and sparrow-ipc DLLs to executable directory"
23+
)
24+
endif()
25+
1126
target_include_directories(${test_target}
1227
PRIVATE
1328
${CMAKE_BINARY_DIR}/generated

0 commit comments

Comments
 (0)