Skip to content

Commit d7605d9

Browse files
committed
simplify dll copy
1 parent cfc4ea0 commit d7605d9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/tests/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,9 @@ set(shape_file ${CMAKE_CURRENT_BINARY_DIR}/test_shape.h5)
6464
# --- Windows shared DLLs
6565
if(WIN32 AND BUILD_SHARED_LIBS AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.21)
6666
add_custom_command(TARGET test_shape POST_BUILD
67-
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:test_shape> $<TARGET_FILE_DIR:test_shape>
67+
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:test_shape> "$<$<BOOL:${HDF5_DLLS}>:${HDF5_DLLS}>" $<$<BOOL:${ZLIB_DLL}>:${ZLIB_DLL}> $<TARGET_FILE_DIR:test_shape>
6868
COMMAND_EXPAND_LISTS
6969
)
70-
if(HDF5_DLLS AND ZLIB_DLL)
71-
add_custom_command(TARGET test_shape POST_BUILD
72-
COMMAND ${CMAKE_COMMAND} -E copy ${HDF5_DLLS} ${ZLIB_DLL} $<TARGET_FILE_DIR:test_shape>
73-
COMMAND_EXPAND_LISTS
74-
)
75-
endif()
7670
endif()
7771

7872
# --- Python h5py

0 commit comments

Comments
 (0)