File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,11 @@ set(EXAMPLE_TESTS
2626 lm_timestr
2727)
2828
29- # Determine which library target to use (prefer shared if available)
30- if (TARGET mseed_shared)
29+ # Determine which library target to use
30+ # On Windows, prefer static to avoid DLL path issues during testing
31+ if (WIN32 AND TARGET mseed_static)
32+ set (MSEED_TEST_LIBRARY mseed_static)
33+ elseif (TARGET mseed_shared)
3134 set (MSEED_TEST_LIBRARY mseed_shared)
3235elseif (TARGET mseed_static)
3336 set (MSEED_TEST_LIBRARY mseed_static)
@@ -92,9 +95,9 @@ endforeach()
9295file (COPY ${CMAKE_CURRENT_SOURCE_DIR} /data
9396 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
9497
95- # On Windows, copy the shared library DLL to the test output directory
98+ # On Windows with shared library, copy the DLL to the test output directory
9699# so that tests can find it at runtime
97- if (WIN32 AND TARGET mseed_shared)
100+ if (WIN32 AND MSEED_TEST_LIBRARY STREQUAL " mseed_shared" )
98101 # Use the first test program to determine the output directory
99102 list (GET TEST_PROGRAMS 0 FIRST_TEST)
100103 add_custom_command (TARGET ${FIRST_TEST} POST_BUILD
You can’t perform that action at this time.
0 commit comments