-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_global.pri
121 lines (96 loc) · 3.48 KB
/
config_global.pri
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
# get current path
PACKAGE_PWD = $$PWD
#SOURCE_TREE = $$PWD/../
SOURCE_TREE = $$PWD/
CONFIG( debug, debug|release ) {
BIN_PATH = $${SOURCE_TREE}/bin/debug
} else {
BIN_PATH = $${SOURCE_TREE}/bin/release
}
LIB_PATH = $${SOURCE_TREE}/lib
PLUGIN_PATH = $${BIN_PATH}/plugins/hehui
DLL_PATH = $${BIN_PATH}
HEADERS_PATH = $${SOURCE_TREE}/include
##config for application
contains(TEMPLATE, app){
DESTDIR = $${BIN_PATH}
}
##config for library
contains(TEMPLATE, lib){
contains(CONFIG, plugin){
DLLDESTDIR = $${PLUGIN_PATH}
win32:DESTDIR = $${LIB_PATH}
else:DESTDIR = $$DLLDESTDIR
}else{
DLLDESTDIR = $$[QT_INSTALL_BINS]
DESTDIR = $${LIB_PATH}
}
win32:QMAKE_DISTCLEAN += $${DLLDESTDIR}\\$${TARGET}.dll
}
# package name
PACKAGE_TARGET = HeHui
mac:PACKAGE_TARGET = $$quote(HeHui)
# package destdir
PACKAGE_DESTDIR = $${PACKAGE_PWD}/bin
# temporary path for building
#PACKAGE_BUILD_PATH = $${PACKAGE_PWD}/tmp/$${TARGET}
PACKAGE_BUILD_PATH = $${SOURCE_TREE}/temp/$${TARGET}
# build mode
#CONFIG += qt warn_on thread x11 windows release
# define config mode paths
CONFIG( debug, debug|release ) {
#message( DEBUG Build )
#Output Debugging Messages, For Windows
CONFIG += console
unix:PACKAGE_TARGET = $$quote($$join(PACKAGE_TARGET,,,_debug))
else:PACKAGE_TARGET = $$quote($$join(PACKAGE_TARGET,,,d))
unix:TARGET = $$quote($$join(TARGET,,,_debug))
else:TARGET = $$quote($$join(TARGET,,,d))
unix:OBJECTS_DIR = $${PACKAGE_BUILD_PATH}/debug/.obj/unix
win32:OBJECTS_DIR = $${PACKAGE_BUILD_PATH}/debug/.obj/win32
mac:OBJECTS_DIR = $${PACKAGE_BUILD_PATH}/debug/.obj/mac
#UI_DIR = $${PACKAGE_BUILD_PATH}/debug/.ui
#UI_DIR = $${PACKAGE_PWD}/.ui
MOC_DIR = $${PACKAGE_BUILD_PATH}/debug/.moc
RCC_DIR = $${PACKAGE_BUILD_PATH}/debug/.rcc
} else {
#message( RELEASE Build )
#Disable Debug Output
DEFINES += QT_NO_DEBUG_OUTPUT
mac:TARGET = $$quote($$TARGET)
unix:OBJECTS_DIR = $${PACKAGE_BUILD_PATH}/release/.obj/unix
win32:OBJECTS_DIR = $${PACKAGE_BUILD_PATH}/release/.obj/win32
mac:OBJECTS_DIR = $${PACKAGE_BUILD_PATH}/release/.obj/mac
#UI_DIR = $${PACKAGE_BUILD_PATH}/release/.ui
#UI_DIR = $${PACKAGE_PWD}/.ui
MOC_DIR = $${PACKAGE_BUILD_PATH}/release/.moc
RCC_DIR = $${PACKAGE_BUILD_PATH}/release/.rcc
}
#set INCLUDEPATH
INCLUDEPATH += $${OUT_PWD} \
$$UI_DIR \
$$MOC_DIR \
$$RCC_DIR \
$$OBJECTS_DIR
#DEPENDPATH += $$UI_DIR
# define some usefull values
#QMAKE_TARGET_COMPANY = "He Hui Team"
#QMAKE_TARGET_PRODUCT = "He Hui"
#QMAKE_TARGET_DESCRIPTION = "Crossplatform Libraries Based On Qt Of LGPL Edition"
#QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2007 - 2010 He Hui"
#PACKAGE_DOMAIN = "www.hehui.org"
#APP_ORG = "He Hui"
#APP_AUTHOR = "He Hui"
#APP_AUTHOR_EMAIL = "[email protected]"
#APP_LICENSE = "LGPL"
## define variable for source code
##DEFINES *= "APP_NAME=\"\\\"$${QMAKE_TARGET_PRODUCT}\\\"\"" \
#DEFINES *= "APP_VERSION=\"\\\"$${VERSION}\\\"\"" \
# "APP_ORG=\"\\\"$${APP_ORG}\\\"\"" \
# "APP_ORG_DOMAIN=\"\\\"$${PACKAGE_DOMAIN}\\\"\"" \
# "APP_AUTHOR=\"\\\"$${APP_AUTHOR}\\\"\"" \
# "APP_AUTHOR_EMAIL=\"\\\"$${APP_AUTHOR_EMAIL}\\\"\"" \
# "APP_LICENSE=\"\\\"$${APP_LICENSE}\\\"\"" \
# "APP_COPYRIGHTS=\"\\\"$${QMAKE_TARGET_COPYRIGHT}\\\"\""
win32-g++:QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
#win32-g++:QMAKE_CXXFLAGS_EXCEPTIONS_OFF =