@@ -1,118 +1,118 | |||
|
1 | 1 | ##################### LIB ################################################# |
|
2 | 2 | |
|
3 | 3 | LIBRARY_NAME = QtCommercialChart |
|
4 | 4 | CONFIG(debug, debug|release) { |
|
5 | 5 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) |
|
6 | 6 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) |
|
7 | 7 | } |
|
8 | 8 | |
|
9 | 9 | LIBS += -l$$LIBRARY_NAME |
|
10 | 10 | |
|
11 | 11 | # This will undefine Q_DECL_EXPORT/Q_DECL_IMPORT at qchartglobal.h |
|
12 | 12 | # They should not be used for staticlib builds. |
|
13 | 13 | staticlib:DEFINES+=QTCOMMERCIALCHART_STATICLIB |
|
14 | 14 | |
|
15 | 15 | #################### COVERAGE ################################################################# |
|
16 | 16 | coverage: CONFIG += debug |
|
17 | 17 | |
|
18 | 18 | ##################### SHADOW CONFIG ################################################# |
|
19 | 19 | |
|
20 | 20 | !contains($${PWD}, $${OUT_PWD}){ |
|
21 | 21 | search = "$$PWD:::" |
|
22 | 22 | temp = $$split(search,"/") |
|
23 | 23 | temp = $$last(temp) |
|
24 | 24 | path = $$replace(search,$$temp,'') |
|
25 | 25 | temp = $$split(OUT_PWD,$$path) |
|
26 | 26 | temp = $$split(temp,'/') |
|
27 | 27 | temp = $$first(temp) |
|
28 | 28 | path = "$${path}$${temp}" |
|
29 | 29 | SHADOW=$$path |
|
30 | 30 | }else{ |
|
31 | 31 | SHADOW=$$PWD |
|
32 | 32 | CONFIG-=development_build |
|
33 | 33 | } |
|
34 | 34 | |
|
35 | 35 | ##################### BUILD PATHS ################################################## |
|
36 | 36 | |
|
37 | 37 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include |
|
38 | 38 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private |
|
39 | 39 | CHART_BUILD_LIB_DIR = $$SHADOW/lib |
|
40 | 40 | CHART_BUILD_DIR = $$SHADOW/build |
|
41 | 41 | CHART_BUILD_BIN_DIR = $$SHADOW/bin |
|
42 | 42 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR |
|
43 | 43 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR |
|
44 | 44 | CHART_BUILD_DOC_DIR = $$SHADOW/doc |
|
45 | 45 | |
|
46 | 46 | CONFIG(release,debug|release){ |
|
47 | 47 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/release |
|
48 | 48 | CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/release |
|
49 | 49 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/release/QtCommercial/Chart |
|
50 | 50 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR |
|
51 | 51 | } |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | CONFIG(debug,debug|release){ |
|
55 | 55 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/debug |
|
56 | 56 | CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/debug |
|
57 | 57 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/debug/QtCommercial/Chart |
|
58 | 58 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR |
|
59 | 59 | } |
|
60 | 60 | # Use own folders for debug and release builds |
|
61 | 61 | |
|
62 | 62 | CONFIG(debug, debug|release):CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/debug) |
|
63 | 63 | CONFIG(release, debug|release): CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/release) |
|
64 | 64 | |
|
65 | 65 | |
|
66 | win32:{ | |
|
66 | contains(QMAKE_HOST.os, Windows) { | |
|
67 | 67 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") |
|
68 | 68 | CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") |
|
69 | 69 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") |
|
70 | 70 | CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") |
|
71 | 71 | CHART_BUILD_QML_PLUGIN_DIR = $$replace(CHART_BUILD_QML_PLUGIN_DIR, "/","\\") |
|
72 | 72 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$replace(CHART_BUILD_DESIGNER_PLUGIN_DIR, "/","\\") |
|
73 | 73 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") |
|
74 | 74 | CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\") |
|
75 | 75 | } |
|
76 | 76 | |
|
77 | 77 | mac: { |
|
78 | 78 | # Some Qt versions use an incompatible configuration on OSX which makes the build fail. |
|
79 | 79 | # As a work-around, set the minimum OSX version to 10.5. |
|
80 | 80 | QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 |
|
81 | 81 | QMAKE_LFLAGS *= -mmacosx-version-min=10.5 |
|
82 | 82 | } |
|
83 | 83 | |
|
84 | 84 | linux-arm*: { |
|
85 | 85 | DEFINES+=QT_ON_ARM |
|
86 | 86 | } |
|
87 | 87 | |
|
88 | 88 | ##################### INCLUDES ############################################################ |
|
89 | 89 | |
|
90 | 90 | |
|
91 | 91 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
92 | 92 | |
|
93 | 93 | !win32: { |
|
94 | 94 | LIBS += -L$$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR |
|
95 | 95 | } else { |
|
96 | 96 | win32-msvc*: { |
|
97 | 97 | # hack fix for error: |
|
98 | 98 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" |
|
99 | 99 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR |
|
100 | 100 | } else { |
|
101 | 101 | LIBS += -L$$CHART_BUILD_LIB_DIR |
|
102 | 102 | } |
|
103 | 103 | } |
|
104 | 104 | |
|
105 | 105 | ##################### DEVELOPMENT BUILD ################################################### |
|
106 | 106 | |
|
107 | 107 | development_build: { |
|
108 | 108 | DEFINES+=DEVELOPMENT_BUILD |
|
109 | 109 | CONFIG+=debug_and_release |
|
110 | 110 | CONFIG+=build_all |
|
111 | 111 | } |
|
112 | 112 | |
|
113 | 113 | ##################### UNIT TESTS ############################################################## |
|
114 | 114 | |
|
115 | 115 | CONFIG(debug, debug|release) { |
|
116 | 116 | DEFINES+=BUILD_PRIVATE_UNIT_TESTS |
|
117 | 117 | } |
|
118 | 118 |
General Comments 0
You need to be logged in to leave comments.
Login now