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