diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2020-12-01 16:20:56 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2020-12-01 16:20:56 +0100 |
| commit | b09662e7136040a22d70141df5fc546606b90e34 (patch) | |
| tree | e3f2791aa2de5a6ca06126d124b94ae04df725c8 | |
| parent | f52526f6f39b665752ecb72eedbb3a98b42c194a (diff) | |
| download | tddd86-b09662e7136040a22d70141df5fc546606b90e34.tar.gz | |
add .prolab5
| -rwxr-xr-x | labb5/Boggle.pro | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/labb5/Boggle.pro b/labb5/Boggle.pro new file mode 100755 index 0000000..56b1b65 --- /dev/null +++ b/labb5/Boggle.pro @@ -0,0 +1,60 @@ +TEMPLATE = app + +CONFIG += console +# Make sure we do not accidentally #include files placed in 'resources' +CONFIG += no_include_pwd + +# 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 + +# 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() +} |
