I have a cmake i am copying a dll from one location to another as follows:
set(dllpath "C:/images/own/standard/abc.dll")
STRING(REGEX REPLACE "/" "\\\\" copyDll \"${dllpath }\")
STRING(REGEX REPLACE "/" "\\\\" copyDest \"${CMAKE_BINARY_DIR}/_runtime/bin_${CMAKE_BUILD_TYPE}\")
add_custom_command(TARGET my_test POST_BUILD COMMAND copyDll ${copyDest})
Then it shows error as:
"C:\images\own\standard\abc.dll\" is not recognized as internal or external command.
If i copy the dll in the following way it open up the dll file and do not copy the dll:
STRING(REGEX REPLACE "/" "\\\\" copyDest \"${CMAKE_BINARY_DIR}/_runtime/bin_${CMAKE_BUILD_TYPE}\")
add_custom_command(TARGET my_test POST_BUILD COMMAND "C:\images\own\standard\abc.dll"${copyDest})
Why the dll file gets open up but not copied?