From 7b7f6808a7b2db2ed21103767434c1445f7815c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Thu, 3 Dec 2020 16:27:06 +0100 Subject: add given files l7 --- labb7/PatternRecognition.pro | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 labb7/PatternRecognition.pro (limited to 'labb7/PatternRecognition.pro') diff --git a/labb7/PatternRecognition.pro b/labb7/PatternRecognition.pro new file mode 100644 index 0000000..a63cef6 --- /dev/null +++ b/labb7/PatternRecognition.pro @@ -0,0 +1,40 @@ +QT += widgets +SOURCES = $$PWD/src/*.cpp +#SOURCES += $$PWD/lib/*.cpp +HEADERS = $$PWD/src/*.h +#HEADERS += $$PWD/lib/*.h + +QMAKE_CXXFLAGS += -std=c++11 + +INCLUDEPATH += $$PWD/lib/ + +# Copies the given files to the destination directory +defineTest(copyToDestdir) { + files = $$1 + + for(FILE, files) { + DDIR = $$OUT_PWD + + # Replace slashes in paths with backslashes for Windows + win32:FILE ~= s,/,\\,g + win32:DDIR ~= s,/,\\,g + + !win32 { + QMAKE_POST_LINK += cp -r '"'$$FILE'"' '"'$$DDIR'"' $$escape_expand(\\n\\t) + } + win32 { + QMAKE_POST_LINK += xcopy '"'$$FILE'"' '"'$$DDIR'"' /e /y $$escape_expand(\\n\\t) + } + } + + export(QMAKE_POST_LINK) +} +!win32 { + copyToDestdir($$files($$PWD/res/*)) +} +win32 { + copyToDestdir($$PWD/res) +} +macx { + cache() +} -- cgit v1.2.1