-
Notifications
You must be signed in to change notification settings - Fork 0
/
headcooker.pro
115 lines (96 loc) · 2.87 KB
/
headcooker.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#-------------------------------------------------
#
# Project created by QtCreator 2015-08-17T10:50:37
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = headcooker
TEMPLATE = app
LIBS += -lcurl
LIBS += -lsqlite3
QMAKE_CXXFLAGS += -std=c++11
SOURCES += main.cpp\
frontend/Headcookerwindow.cpp \
frontend/RecipeWidget.cpp \
frontend/FlowLayout.cpp \
frontend/RecipeChooser.cpp \
backend/Curler.cpp \
backend/RecipeApiParser.cpp \
backend/xml/XMLTreeObject.cpp \
backend/Recipe.cpp \
backend/database/DataRow.cpp \
backend/database/Database.cpp \
backend/DataTypes.cpp \
frontend/ExtendedButton.cpp \
frontend/ExtendedLineEdit.cpp \
backend/Options.cpp \
frontend/menu/StyleMenu.cpp \
frontend/menu/OptionsMenu.cpp \
backend/Util.cpp \
backend/FirefoxParser.cpp \
frontend/menu/ImportMenu.cpp \
frontend/MultiTagInput.cpp \
frontend/CheckBoxBar.cpp
HEADERS += frontend/Headcookerwindow.h \
frontend/RecipeWidget.h \
frontend/FlowLayout.h \
frontend/RecipeChooser.h \
backend/Curler.h \
backend/RecipeApiParser.h \
backend/xml/XMLTree.h \
backend/xml/XMLTreeObject.h \
backend/Recipe.h \
backend/database/DataRow.h \
backend/database/Database.h \
backend/DataTypes.h \
frontend/ExtendedButton.h \
frontend/ExtendedLineEdit.h \
backend/Options.h \
frontend/menu/StyleMenu.h \
frontend/menu/OptionsMenu.h \
frontend/menu/MenuWidget.h \
backend/Util.h \
backend/FirefoxParser.h \
frontend/menu/ImportMenu.h \
frontend/MultiTagInput.h \
frontend/CheckBoxBar.h
FORMS += frontend/Headcookerwindow.ui \
frontend/RecipeWidget.ui \
frontend/RecipeChooser.ui \
frontend/menu/StyleMenu.ui \
frontend/menu/OptionsMenu.ui \
frontend/menu/ImportMenu.ui \
frontend/MultiTagInput.ui \
frontend/CheckBoxBar.ui
# Define copy command for linux and windows
QMAKE_COPY = cp -rf
Win32:QMAKE_COPY = copy /y
# cp(src, dest) returns the copy command
defineReplace(cp) {
SDIR = $$PWD/$$1
DDIR = $$OUT_PWD/$$2
# Replace slashes in paths with backslashes for Windows
win32:DDIR ~= s,/,\\,g
win32:SDIR ~= s,/,\\,g
return($$QMAKE_COPY $$SDIR $$DDIR;)
}
#Directorys to create
DIRS = style \
img/recipe
#Loop over all given directories and append
#the build directory to make absolute paths
for(DIR, DIRS) {
#append directorys to base dir
mkcommands += $$OUT_PWD/$$DIR
}
#make a custom createDir variable with
#the command mkdir path1 path2 path3 ...
createDirs.commands = $(MKDIR) $$mkcommands
cpFiles.commands += $$cp(style/*, style/)
cpFiles.commands += $$cp(img/*, img/)
#Add dependencies to first
first.depends += createDirs
first.depends += cpFiles
#add dependencies to makefile
QMAKE_EXTRA_TARGETS += first createDirs cpFiles