-
Notifications
You must be signed in to change notification settings - Fork 3
/
harbour-sailfish_sinaweibo.pro
227 lines (193 loc) · 7.26 KB
/
harbour-sailfish_sinaweibo.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
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
TEMPLATE = app
# The name of your application
TARGET = harbour-sailfish_sinaweibo
QT += qml quick network
CONFIG += sailfishapp sailfishapp_no_deploy_qml
CONFIG += c++11
CONFIG += WITH_HACKLOGIN WITH_SDK_WRAPPER
QMAKE_CFLAGS_DEBUG += -fPIC
QMAKE_CFLAGS_RELEASE += -fPIC
QMAKE_CXXFLAGS += -fPIC
DEFINES += \
SAILFISH_OS
win32 {
DEFINES += \
VERSION_STR="win32_dummy"
}
unix {
DEFINES += \
VERSION_STR=\\\"$$system($${PWD}/get_version_str.sh)\\\"
}
include (src/QSinaWeiboApi/QWeiboSDK/QWeiboSDK.pri)
OTHER_FILES += \
rpm/harbour-sailfish_sinaweibo.changes.in \
rpm/harbour-sailfish_sinaweibo.spec \
rpm/harbour-sailfish_sinaweibo.yaml \
harbour-sailfish_sinaweibo.desktop \
translations/* \
qml/pages/*.qml \
qml/components/*.qml \
qml/cover/*.qml \
qml/ui/*.qml \
qml/requests/*.qml \
qml/SailfishWeibo.qml \
qml/js/*.js \
qml/WeiboFunctions.qml \
qml/WBSendFunctions.qml
graphics.path = /usr/share/$${TARGET}/qml/graphics
graphics.files += qml/graphics/*
INSTALLS += graphics
emoticons.path = /usr/share/$${TARGET}/qml/emoticons
emoticons.files += qml/emoticons/*
INSTALLS += emoticons
warning.path = /usr/share/$${TARGET}/qml
warning.files += qml/warning.html
INSTALLS += warning
###############################################
# ugly hack for i486 and arm platform
# Currently, I can only distinguish between i486 and arm from this g++ flag
####################
#arm
linux-g++ {
lib_armv7hl.path = /usr/share/$${TARGET}/lib/armv7hl
lib_armv7hl.files += \
prelibrary/htmlcxx/armv7hl/libcss_parser_pp.so \
prelibrary/htmlcxx/armv7hl/libcss_parser_pp.so.0 \
prelibrary/htmlcxx/armv7hl/libcss_parser.so \
prelibrary/htmlcxx/armv7hl/libcss_parser.so.0 \
prelibrary/htmlcxx/armv7hl/libhtmlcxx.so \
prelibrary/htmlcxx/armv7hl/libhtmlcxx.so.3
INSTALLS += lib_armv7hl
}
#i486
linux-g++-32 {
lib_i486.path = /usr/share/$${TARGET}/lib/i486
lib_i486.files += \
prelibrary/htmlcxx/i486/libcss_parser_pp.so \
prelibrary/htmlcxx/i486/libcss_parser_pp.so.0 \
prelibrary/htmlcxx/i486/libcss_parser.so \
prelibrary/htmlcxx/i486/libcss_parser.so.0 \
prelibrary/htmlcxx/i486/libhtmlcxx.so \
prelibrary/htmlcxx/i486/libhtmlcxx.so.3
INSTALLS += lib_i486
}
INCLUDEPATH += $$PWD/prelibrary/htmlcxx/include
LIBS += \
-lhtmlcxx \
-lcss_parser_pp \
-lcss_parser
#QMAKE_LFLAGS_RPATH += \
# /usr/share/$${TARGET}/lib \
# /usr/share/$${TARGET}/lib/i486 \
# /usr/share/$${TARGET}/lib/armv7hl \
# $$PWD/prelibrary/htmlcxx/armv7hl \
# $$PWD/prelibrary/htmlcxx/i486
QMAKE_RPATHDIR += \
/usr/share/$${TARGET}/lib \
/usr/share/$${TARGET}/lib/i486 \
/usr/share/$${TARGET}/lib/armv7hl \
$$PWD/prelibrary/htmlcxx/armv7hl \
$$PWD/prelibrary/htmlcxx/i486
QMAKE_LIBDIR += \
/usr/share/$${TARGET}/lib \
/usr/share/$${TARGET}/lib/i486 \
/usr/share/$${TARGET}/lib/armv7hl \
$$PWD/prelibrary/htmlcxx/armv7hl \
$$PWD/prelibrary/htmlcxx/i486
HEADERS += \
src/app/Emoticons.h \
src/app/Settings.h \
src/app/WBNetworkAccessManagerFactory.h \
src/app/WBNetworkAccessManager.h \
src/app/Utility.h \
src/app/WBContentParser.h \
src/app/WBSender.h
SOURCES += \
src/app/Emoticons.cpp \
src/app/SailfishWeibo.cpp \
src/app/Settings.cpp \
src/app/WBNetworkAccessManagerFactory.cpp \
src/app/WBNetworkAccessManager.cpp \
src/app/Utility.cpp \
src/app/WBContentParser.cpp \
src/app/WBSender.cpp
# to disable building translations every time, comment out the
# following CONFIG line
CONFIG += sailfishapp_i18n
TRANSLATIONS += translations/harbour-sailfish_sinaweibo-de.ts \
translations/harbour-sailfish_sinaweibo-zh_CN.ts
RESOURCES += \
qml/resource.qrc
win32 {
COPY = copy /y
MKDIR = mkdir
} else {
COPY = cp
MKDIR = mkdir -p
}
#url=http://htmlcxx.sourceforge.net/
#prefix=/usr
#exec_prefix=${prefix}
#libdir=${prefix}/lib/x86_64-linux-gnu
#includedir=${prefix}/include
#Name: htmlcxx
#Description: html and css apis for c++
#Version: 0.85
#Libs: -L${libdir} -lhtmlcxx -lcss_parser_pp -lcss_parser
#Cflags: -I${includedir}
#URL: ${url}
#!equals($${_PRO_FILE_PWD_}, $${OUT_PWD}) {
# for(f, OTHER_FILES){
# #TODO need windows basename cmd
# unix:base_name = $$basename(f)
# dist = $${OUT_PWD}/$${PLUGINS_PREFIX}
# dist_file = $${OUT_PWD}/$${PLUGINS_PREFIX}/$${base_name}
# !exists($$dist):system($$MKDIR $$dist)
# !exists($$dist_file):system($$COPY $$f $$dist_file)
# }
#}
LIB_BUILD_DIR = $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build
BUILD_LIB = cd $$LIB_BUILD_DIR \
&& ../htmlcxx/configure --enable-shared --enable-static \
&& make
#system ($$MKDIR $$LIB_BUILD_DIR)
#system ($$BUILD_LIB)
#TAGLIB_FILE = \
# $$PWD/../../../ThirdParty/Taglib/target/lib/*.so \
# $$PWD/../../../ThirdParty/Taglib/target/lib/*.so.*
#taglib.files = $${TAGLIB_FILE}
#!isEmpty(UBUNTU_MANIFEST_FILE){
# taglib.path = $${UBUNTU_CLICK_PLUGIN_PATH}/lib
#} else {
# taglib.path = $${LIB_DIR}/lib
#}
#INSTALLS += taglib
#COPY_LIB = cd $${TAGLIB_TARGET_DIR}/lib \
# && for i in `ls`;do if [ -f $i ];then $$COPY $i $${OUT_PWD}/../../../target/lib;fi;done
#system ($$COPY_LIB)
#INCLUDEPATH += \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx/css \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx/html
#DEPENDPATH += \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx/css \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx/html
#win32-g++:CONFIG(release, debug|release): LIBS += \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/release/libcss_parser.a \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/release/libcss_parser_pp.a \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/html/.libs/release/libhtmlcxx.a
#else:win32-g++:CONFIG(debug, debug|release): LIBS += \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/debug/libcss_parser.a\
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/debug/libcss_parser_pp.a \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/html/.libs/debug/libhtmlcxx.a
#else:win32:!win32-g++:CONFIG(release, debug|release): LIBS += \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/release/css_parser.lib \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/release/css_parser_pp.lib \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/html/.libs/release/htmlcxx.lib
#else:win32:!win32-g++:CONFIG(debug, debug|release): LIBS += \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/debug/css_parser.lib \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/debug/css_parser_pp.lib \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/html/.libs/debug/htmlcxx.lib
#else:unix: LIBS += \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/libcss_parser.a \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/css/.libs/libcss_parser_pp.a \
# $$PWD/src/QSinaWeiboApi/QWeiboSDK/HackLogin/htmlcxx-build/html/.libs/libhtmlcxx.a