Skip to content

Commit 25c7699

Browse files
committed
Improved dll library copying
1 parent efcbd7d commit 25c7699

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ if(WIN32)
162162
set(depthai_dll_libraries "$<TARGET_RUNTIME_DLLS:${TARGET_NAME}>")
163163
endif()
164164
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND
165-
${CMAKE_COMMAND} -E copy ${depthai_dll_libraries} $<TARGET_FILE_DIR:${TARGET_NAME}>
165+
"$<$<BOOL:${depthai_dll_libraries}>:${CMAKE_COMMAND};-E;copy_if_different;${depthai_dll_libraries};$<TARGET_FILE_DIR:${TARGET_NAME}>>"
166166
COMMAND_EXPAND_LISTS
167+
VERBATIM
167168
)
168169

169170
# Disable "d" postfix, so python can import the library as is

0 commit comments

Comments
 (0)