We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1103b6a commit 5936342Copy full SHA for 5936342
test/CMakeLists.txt
@@ -91,3 +91,16 @@ endforeach()
91
# Copy test data directory to build directory
92
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data
93
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
94
+
95
+# On Windows, copy the shared library DLL to the test output directory
96
+# so that tests can find it at runtime
97
+if(WIN32 AND TARGET mseed_shared)
98
+ # Use the first test program to determine the output directory
99
+ list(GET TEST_PROGRAMS 0 FIRST_TEST)
100
+ add_custom_command(TARGET ${FIRST_TEST} POST_BUILD
101
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
102
+ $<TARGET_FILE:mseed_shared>
103
+ $<TARGET_FILE_DIR:${FIRST_TEST}>
104
+ COMMENT "Copying mseed DLL to test directory"
105
+ )
106
+endif()
0 commit comments