I want to run
add_custom_command(TARGET ProjectName POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "SRC" "DEST" COMMENT "My Custom message")
only when visual studio compiles the project in debug configuration. If the project is being compiled in Release mode then I dont want to copy this particular directory. How do I implement such cases using cmake.