File: pumpa.pro

package info (click to toggle)
pumpa 0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,644 kB
  • ctags: 1,456
  • sloc: cpp: 8,255; ansic: 3,533; xml: 20; makefile: 7
file content (240 lines) | stat: -rw-r--r-- 6,960 bytes parent folder | download
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# -*- mode: makefile -*-
######################################################################
#  Copyright 2013 Mats Sjöberg
#  
#  This file is part of the Pumpa programme.
#
#  Pumpa is free software: you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Pumpa is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with Pumpa.  If not, see <http://www.gnu.org/licenses/>.
######################################################################

TEMPLATE = app
TARGET = pumpa
RESOURCES += pumpa.qrc
OBJECTS_DIR = obj

QT += core gui network

# To enable debug mode, run as:
# qmake CONFIG+=debug
# or uncomment this:
# CONFIG+=debug

# To disable libtidy (not recommended), run as:
# qmake CONFIG+=notidy
# or uncomment this line:
# CONFIG += notidy

CONFIG(release, debug|release) {
  message("Release mode on")
} else {
  message("Debug mode on")
  CONFIG -= release
# Enable debugging output for different things
#  DEFINES += DEBUG_QAS
  DEFINES += DEBUG_NET
#  DEFINES += DEBUG_NET_MOAR
#  DEFINES += DEBUG_NET_EVEN_MOAR
  DEFINES += DEBUG_MEMORY
  DEFINES += DEBUG_MARKUP
#  DEFINES += DEBUG_WIDGETS
  DEFINES += DEBUG_BUTTONS
}

unix:!macx {
  message("Enabling dbus")
  QT += dbus
  DEFINES += USE_DBUS
}

win32 {
  RC_FILE = win32/pumpa.rc
}

# Additions for Qt 4
lessThan(QT_MAJOR_VERSION, 5) {
  message("Configuring for Qt 4")
  LIBS += -lqjson
}

# Additions for Qt 5
greaterThan(QT_MAJOR_VERSION, 4) { 
  message("Configuring for Qt 5")
  QT += widgets
  DEFINES += QT5
}

notidy {
  message("Disabling libtidy")
  DEFINES += NO_TIDY
} else {
  message("Using libtidy")
  LIBS += -ltidy
  exists( /usr/include/tidy/tidy.h ) {
    DEFINES += USE_TIDY_TIDY
  } else:exists( /usr/include/tidy.h ) {
    DEFINES += USE_TIDY
  } else:exists( /usr/local/include/tidy.h ) {
    DEFINES += USE_TIDY
  } else:exists( /usr/local/include/tidy/tidy.h ) {
    DEFINES += USE_TIDY_TIDY
  } else {
    error("Unable to find libtidy header files for compiling! Install libtidy-dev (Debian, Ubuntu) or libtidy-devel (Fedora).")
  }
}

# Optional spell checking support with libaspell
exists( /usr/include/aspell.h )|exists( /usr/local/include/aspell.h ) {
  message("Using aspell")
  LIBS += -laspell
  DEFINES += USE_ASPELL
} else {
  warning("Unable to find libaspell header files for compiling. Install libaspell-dev (Debian, Ubuntu) if you want to enable spell-checking.")
}

# Optionally use etags
exists( /usr/bin/etags ) {
  message("Using etags")
  PRE_TARGETDEPS += etags
}


######################################################################
# Main sources 
######################################################################

INCLUDEPATH += src
VPATH       += src

OBJECT_HEADERS = pumpapp.h qactivitystreams.h aswidget.h		\
	collectionwidget.h contextwidget.h json.h messagewindow.h	\
	messageedit.h messagerecipients.h fancyhighlighter.h		\
	qaspell.h actorwidget.h filedownloader.h richtextlabel.h	\
	oauthwizard.h tabwidget.h util.h pumpasettingsdialog.h		\
	pumpasettings.h activitywidget.h objectwidget.h			\
	shortobjectwidget.h fullobjectwidget.h imagelabel.h		\
	texttoolbutton.h objectwidgetwithsignals.h objectlistwidget.h	\
	qasabstractobject.h qasobject.h qasactor.h qasactivity.h	\
	qasobjectlist.h qasactorlist.h qascollection.h			\
	qasabstractobjectlist.h

OBJECT_SOURCES = $$replace(OBJECT_HEADERS, \\.h, .cpp)
OBJECT_ALL = $$OBJECT_HEADERS $$OBJECT_SOURCES

SUNDOWN_HEADERS = sundown/markdown.h sundown/html.h sundown/buffer.h

SUNDOWN_SOURCES = sundown/autolink.c sundown/buffer.c		\
	sundown/houdini_href_e.c sundown/houdini_html_e.c	\
	sundown/html.c sundown/markdown.c sundown/stack.c

HEADERS += $$OBJECT_HEADERS $$SUNDOWN_HEADERS pumpa_defines.h
SOURCES += main.cpp
SOURCES += $$OBJECT_SOURCES $$SUNDOWN_SOURCES

######################################################################
# Translation files
######################################################################

TRANSLATIONS = \
	translations/pumpa_es.ts \
	translations/pumpa_fr.ts \
	translations/pumpa_nvi.ts \
	translations/pumpa_en.ts \
	translations/pumpa_it.ts \
	translations/pumpa_de.ts


######################################################################
# kQOAuth sources
######################################################################

INCLUDEPATH += src/kQOAuth
VPATH       += src/kQOAuth

PUBLIC_HEADERS += kqoauthmanager.h \
                  kqoauthrequest.h \
                  kqoauthrequest_1.h \
                  kqoauthrequest_xauth.h \
                  kqoauthglobals.h 

PRIVATE_HEADERS +=  kqoauthrequest_p.h \
                    kqoauthmanager_p.h \
                    kqoauthauthreplyserver.h \
                    kqoauthauthreplyserver_p.h \
                    kqoauthutils.h \
                    kqoauthrequest_xauth_p.h

HEADERS += \
    $$PUBLIC_HEADERS \
    $$PRIVATE_HEADERS 

SOURCES += \
    kqoauthmanager.cpp \
    kqoauthrequest.cpp \
    kqoauthutils.cpp \
    kqoauthauthreplyserver.cpp \
    kqoauthrequest_1.cpp \
    kqoauthrequest_xauth.cpp

######################################################################
# Install target
######################################################################

unix {
  isEmpty(PREFIX) {
    PREFIX = /usr/local
  }
  BINDIR = $$PREFIX/bin
  DATADIR =$$PREFIX/share

  #DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"

  #MAKE INSTALL

  INSTALLS += target desktop icon32

  target.path =$$BINDIR

  desktop.path = $$DATADIR/applications
  desktop.files += local/$${TARGET}.desktop

  icon32.path = $$DATADIR/icons/hicolor/32x32/apps
  icon32.files += images/$${TARGET}.png
}

# target.path = /usr/bin
# INSTALLS += target

######################################################################
# Generate documentation
######################################################################

doc.depends        = README
doc.commands	   = markdown README > pumpa.html; cp README ~/dev/web/_includes/README.pumpa
QMAKE_EXTRA_TARGETS += doc


######################################################################
# Generate TAGS for GNU Emacs and others
######################################################################

ETAGS_INPUTS   = $$join(OBJECT_ALL, " src/", "src/")
etags.depends  = $$split($$ETAGS_INPUTS)
etags.commands = etags -o src/TAGS $$ETAGS_INPUTS
QMAKE_EXTRA_TARGETS += etags

######################################################################
# Extra stuff to clean up
######################################################################

QMAKE_CLEAN += $DOC_TARGETS src/TAGS