0

I want to copy the contents in directory "temp" to "dd"

BINARY_DESTINATION_PATH = $$PWD$$SEPARATOR/dd/
RESOURCE_SOURCE_PATH = $$PWD$$SEPARATOR/temp

EXPORTED_DESTINATION_PATH = $${BINARY_DESTINATION_PATH}
EXPORTED_DESTINATION_PATH ~= s,/,\\,g

EXPORTED_SOURCE_PATH = $${RESOURCE_SOURCE_PATH}
EXPORTED_SOURCE_PATH ~= s,/,\\,g

QT += core
QT -= gui

CONFIG += c++11

TARGET = sample
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp

win32 {
QMAKE_POST_LINK += $$quote(cmd /c xcopy /S /I /Y $${EXPORTED_HEADERS}\\copy_to_output $${EXPORTED_HEADERS_WIN})
}

but this is not adding the files into dd and showing error on build. Error i son line "QMAKE_POST_LINK"

ekhumoro
  • 115,249
  • 20
  • 229
  • 336
Sijith
  • 3,740
  • 17
  • 61
  • 101
  • Does this post helps? https://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output – piarston Aug 18 '17 at 11:18
  • It is giving details about file copy, I can able to copy files but directory copy is not working – Sijith Aug 18 '17 at 11:24

1 Answers1

0

quote(string)

Converts a whole string into a single entity and returns the result. This is just a fancy way of enclosing the string into double quotes.

What you're probably looking for is system(command).

Murphy
  • 3,827
  • 4
  • 21
  • 35