-
Notifications
You must be signed in to change notification settings - Fork 6
/
fresh-bundle.pri
58 lines (46 loc) · 2.13 KB
/
fresh-bundle.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
win32_crossbuild {
exists( "$(QT_WIN32_PATH)/lib/*fresh*" ):CONFIG *= fresh
} else {
exists( "$$[QT_INSTALL_LIBS]/*fresh*" ):CONFIG *= fresh
}
fresh {
!build_pass:message( "Using system fresh library." )
} else {
isEmpty( FRESH_BUNDLE_PATH ) {
!build_pass:error( "FRESH_BUNDLE_PATH is empty. Please declare this variable before include this file" )
}
isEmpty( FRESH_BUNDLE_LIB_PATH ) {
!build_pass:error( "FRESH_BUNDLE_LIB_PATH is empty. Please declare this variable before include this file" )
}
exists( $${FRESH_BUNDLE_PATH}/fresh.pro ) {
!build_pass:message( "Using bundled fresh library (1)." )
include( $${FRESH_BUNDLE_PATH}/qmake-extensions.git/qmake-extensions.pri )
FRESH_SOURCES_PATHS = $$getFolders( $${FRESH_BUNDLE_PATH}/src )
} else:exists( $${_PRO_FILE_PWD_}/$${FRESH_BUNDLE_PATH}/fresh.pro ) {
!build_pass:message( "Using bundled fresh library (2)." )
include( $${_PRO_FILE_PWD_}/$${FRESH_BUNDLE_PATH}/qmake-extensions.git/qmake-extensions.pri )
isShadowBuild() {
FRESH_SOURCES_PATHS = $$getFolders( $${_PRO_FILE_PWD_}/$${FRESH_BUNDLE_PATH}/src )
} else {
FRESH_SOURCES_PATHS = $$getRelativeFolders( $${_PRO_FILE_PWD_}/$${FRESH_BUNDLE_PATH}/src, $${_PRO_FILE_PWD_}/ )
}
} else {
!build_pass:error( "Fresh library not found - Execute: git submodule init && git submodule update." )
}
DEFINES *= FRESH_CORE_BUILD
DEPENDPATH *= $${FRESH_SOURCES_PATHS}
DEPENDPATH *= $${FRESH_BUNDLE_PATH}/include/FreshCore \
$${FRESH_BUNDLE_PATH}/include/FreshGui
INCLUDEPATH *= $${FRESH_BUNDLE_PATH}/include
INCLUDEPATH *= $${FRESH_SOURCES_PATHS}
QMAKE_RPATHDIR *= $${FRESH_BUNDLE_LIB_PATH}/build
macx:LIBS *= -F$${FRESH_BUNDLE_LIB_PATH}/build
LIBS *= -L$${FRESH_BUNDLE_LIB_PATH}/build
QT *= xml network
exists( $${FRESH_BUNDLE_LIB_PATH}/build/lib$$targetForMode( fresh ).a ) {
PRE_TARGETDEPS *= $${FRESH_BUNDLE_LIB_PATH}/build/lib$$targetForMode( fresh ).a
}
LIBS *= -l$$targetForMode( fresh )
#!macx:qtAddLibrary( fresh )
#macx:LIBS *= -lfresh
}