From 403ce5391e0fecc51bf50c86070ebc0e6d7e05af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 17 Aug 2020 19:34:09 +0200 Subject: add tsp code --- labb3/tsp/TSP.pro | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 labb3/tsp/TSP.pro (limited to 'labb3/tsp/TSP.pro') diff --git a/labb3/tsp/TSP.pro b/labb3/tsp/TSP.pro new file mode 100644 index 0000000..a63cef6 --- /dev/null +++ b/labb3/tsp/TSP.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