##// END OF EJS Templates
Fix Charts mac build...
Titta Heikkala -
r2664:3a0cfadefc42
parent child
Show More
@@ -1,126 +1,126
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_QML2_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR
44 44 CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR
45 45 CHART_BUILD_DOC_DIR = $$SHADOW/doc
46 46
47 47 CONFIG(release,debug|release){
48 48 CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/release
49 49 CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/release
50 50 CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/release/imports/QtCommercial/Chart
51 51 CHART_BUILD_QML2_PLUGIN_DIR = $$CHART_BUILD_QML2_PLUGIN_DIR/release/qml/QtCommercial/Chart
52 52 CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR
53 53 }
54 54
55 55
56 56 CONFIG(debug,debug|release){
57 57 CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/debug
58 58 CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/debug
59 59 CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/debug/imports/QtCommercial/Chart
60 60 CHART_BUILD_QML2_PLUGIN_DIR = $$CHART_BUILD_QML2_PLUGIN_DIR/debug/qml/QtCommercial/Chart
61 61 CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR
62 62 }
63 63 # Use own folders for debug and release builds
64 64
65 65 CONFIG(debug, debug|release):CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/debug)
66 66 CONFIG(release, debug|release): CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/release)
67 67
68 68
69 69 contains(QMAKE_HOST.os, Windows) {
70 70 CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\")
71 71 CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\")
72 72 CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\")
73 73 CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\")
74 74 CHART_BUILD_QML_PLUGIN_DIR = $$replace(CHART_BUILD_QML_PLUGIN_DIR, "/","\\")
75 75 CHART_BUILD_QML2_PLUGIN_DIR = $$replace(CHART_BUILD_QML2_PLUGIN_DIR, "/","\\")
76 76 CHART_BUILD_DESIGNER_PLUGIN_DIR = $$replace(CHART_BUILD_DESIGNER_PLUGIN_DIR, "/","\\")
77 77 CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\")
78 78 CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\")
79 79 }
80 80
81 mac: {
81 macx: {
82 82 # Some Qt versions use an incompatible configuration on OSX which makes the build fail.
83 83 # As a work-around, set the minimum OSX version to 10.5.
84 84 QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
85 85 QMAKE_LFLAGS *= -mmacosx-version-min=10.5
86 86 }
87 87
88 88 linux-arm*: {
89 89 DEFINES+=QT_ON_ARM
90 90 }
91 91
92 92 ##################### INCLUDES ############################################################
93 93
94 94
95 95 INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR $$[QT_INSTALL_HEADERS]/QtCommercialChart
96 96
97 97 !exists($$CHART_BUILD_LIB_DIR) {
98 98 system($$QMAKE_MKDIR $$CHART_BUILD_LIB_DIR)
99 99 }
100 100 !win32: {
101 101 LIBS += -L$$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR
102 102 } else {
103 103 win32-msvc*: {
104 104 # hack fix for error:
105 105 # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'"
106 106 QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR
107 107 } else {
108 108 LIBS += -L$$CHART_BUILD_LIB_DIR
109 109 }
110 110 }
111 111 LIBS += -L$$[QT_INSTALL_LIBS]
112 112
113 113 ##################### DEVELOPMENT BUILD ###################################################
114 114
115 115 development_build: {
116 116 DEFINES+=DEVELOPMENT_BUILD
117 117 CONFIG+=debug_and_release
118 118 CONFIG+=build_all
119 119 }
120 120
121 121 ##################### UNIT TESTS ##############################################################
122 122
123 123 CONFIG(debug, debug|release) {
124 124 DEFINES+=BUILD_PRIVATE_UNIT_TESTS
125 125 }
126 126
General Comments 0
You need to be logged in to leave comments. Login now