summaryrefslogtreecommitdiffstats
path: root/labb6/Huffman.pro
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-12-01 15:25:23 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-12-01 15:25:23 +0100
commit93c6b29368d1e0487937b433bc6e678da0058055 (patch)
tree5e749adfecf2eab82b5e78bbeacc52fc8e2298fb /labb6/Huffman.pro
parentd4f35cf45ebc655d92cde8abb5c9a1c2822a08ba (diff)
downloadtddd86-93c6b29368d1e0487937b433bc6e678da0058055.tar.gz
given code l6
Diffstat (limited to 'labb6/Huffman.pro')
-rwxr-xr-xlabb6/Huffman.pro65
1 files changed, 65 insertions, 0 deletions
diff --git a/labb6/Huffman.pro b/labb6/Huffman.pro
new file mode 100755
index 0000000..725850c
--- /dev/null
+++ b/labb6/Huffman.pro
@@ -0,0 +1,65 @@
+TEMPLATE = app
+
+CONFIG += console
+
+# Make sure we do not accidentally #include files placed in 'resources'
+CONFIG += no_include_pwd
+
+# Reduce compile times and avoid configuration confusion by excluding Qt libs
+#CONFIG -= qt
+
+# Do not create an app bundle when running on OS X
+#CONFIG -= app_bundle
+
+SOURCES = $$PWD/src/*.cpp
+SOURCES += $$PWD/lib/StanfordCPPLib/*.cpp
+
+HEADERS = $$PWD/src/*.h
+HEADERS += $$PWD/lib/StanfordCPPLib/*.h
+# HEADERS += $$PWD/lib/StanfordCPPLib/private/*.h
+
+# GCC defaults to not warning about failing to return from a non-void function
+# We enable this warning manually, since Clang warns by default
+QMAKE_CXXFLAGS += -std=c++11 -Wreturn-type
+
+INCLUDEPATH += $$PWD/lib/StanfordCPPLib/
+
+# Copies the given files to the destination directory
+# The rest of this file defines how to copy the resources folder
+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 {
+ copyResources.commands += cp -r '"'$$FILE'"' '"'$$DDIR'"' $$escape_expand(\\n\\t)
+ }
+ win32 {
+ copyResources.commands += xcopy '"'$$FILE'"' '"'$$DDIR'"' /e /y $$escape_expand(\\n\\t)
+ }
+ }
+ export(copyResources.commands)
+}
+
+!win32 {
+ copyToDestdir($$files($$PWD/res/*))
+ copyToDestdir($$files($$PWD/lib/*.jar))
+}
+win32 {
+ copyToDestdir($$PWD/res)
+ copyToDestdir($$PWD/lib/*.jar)
+}
+
+copyResources.input = $$files($$PWD/res/*)
+OTHER_FILES = $$files(res/*)
+QMAKE_EXTRA_TARGETS += copyResources
+POST_TARGETDEPS += copyResources
+
+macx {
+ cache()
+}