@@ -1,115 +1,115 | |||
|
1 | 1 | |
|
2 | 2 | LIBRARY_NAME = QtCommercialChart |
|
3 | 3 | |
|
4 | 4 | ##################### SHADOW CONFIG ################################################# |
|
5 | 5 | |
|
6 | 6 | !contains($${PWD}, $${OUT_PWD}){ |
|
7 | 7 | search = "$$PWD:::" |
|
8 | 8 | temp = $$split(search,"/") |
|
9 | 9 | temp = $$last(temp) |
|
10 | 10 | path = $$replace(search,$$temp,'') |
|
11 | 11 | temp = $$split(OUT_PWD,$$path) |
|
12 | 12 | temp = $$split(temp,'/') |
|
13 | 13 | temp = $$first(temp) |
|
14 | 14 | path = "$${path}$${temp}" |
|
15 | 15 | SHADOW=$$path |
|
16 | 16 | }else{ |
|
17 | 17 | SHADOW=$$PWD |
|
18 | 18 | CONFIG-=development_build |
|
19 | 19 | } |
|
20 | 20 | |
|
21 | 21 | ##################### BUILD PATHS ################################################## |
|
22 | 22 | |
|
23 | 23 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include |
|
24 | 24 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private |
|
25 | 25 | CHART_BUILD_LIB_DIR = $$SHADOW/lib |
|
26 | 26 | CHART_BUILD_DIR = $$SHADOW/build |
|
27 | 27 | CHART_BUILD_BIN_DIR = $$SHADOW/bin |
|
28 | 28 | CHART_BUILD_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR/QtCommercial/Chart |
|
29 | 29 | CHART_BUILD_DOC_DIR = $$SHADOW/doc |
|
30 | 30 | |
|
31 | 31 | win32:{ |
|
32 | 32 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") |
|
33 | 33 | CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") |
|
34 | 34 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") |
|
35 | 35 | CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") |
|
36 | 36 | CHART_BUILD_PLUGIN_DIR = $$replace(CHART_BUILD_PLUGIN_DIR, "/","\\") |
|
37 | 37 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") |
|
38 | CHART_BUILD_LIB_DIR = CHART_BUILD_BIN_DIR | |
|
38 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_BIN_DIR | |
|
39 | 39 | } |
|
40 | 40 | |
|
41 | 41 | mac: { |
|
42 | 42 | # TODO: The following qmake flags are a work-around to make QtCommercial Charts compile on |
|
43 | 43 | # QtCommercial 4.8. On the other hand Charts builds successfully with Qt open source 4.8 |
|
44 | 44 | # without these definitions, so this is probably a configuration issue on QtCommercial 4.8; |
|
45 | 45 | # it should probably define the minimum OSX version to be 10.5... |
|
46 | 46 | QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 |
|
47 | 47 | QMAKE_LFLAGS *= -mmacosx-version-min=10.5 |
|
48 | 48 | } |
|
49 | 49 | |
|
50 | 50 | ##################### DEVELOPMENT BUILD ################################################### |
|
51 | 51 | |
|
52 | 52 | development_build: { |
|
53 | 53 | DEFINES+=DEVELOPMENT_BUILD |
|
54 | 54 | CONFIG+=debug_and_release |
|
55 | 55 | } |
|
56 | 56 | |
|
57 | 57 | |
|
58 | 58 | ##################### BUILD CONFIG ######################################################## |
|
59 | 59 | |
|
60 | 60 | !system_build:{ |
|
61 | 61 | |
|
62 | 62 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
63 | 63 | |
|
64 | 64 | !win32: { |
|
65 | 65 | LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR |
|
66 | 66 | }else{ |
|
67 | 67 | win32-msvc*: { |
|
68 | 68 | # hack fix for error: |
|
69 | 69 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" |
|
70 | 70 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR |
|
71 | 71 | }else{ |
|
72 | 72 | LIBS += -L $$CHART_BUILD_LIB_DIR |
|
73 | 73 | } |
|
74 | 74 | } |
|
75 | 75 | |
|
76 | 76 | CONFIG(debug, debug|release) { |
|
77 | 77 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) |
|
78 | 78 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) |
|
79 | 79 | } |
|
80 | 80 | |
|
81 | 81 | LIBS += -l$$LIBRARY_NAME |
|
82 | 82 | |
|
83 | 83 | |
|
84 | 84 | mac: { |
|
85 | 85 | # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX |
|
86 | 86 | CHARTS_LIB_NAME = libQtCommercialChart.1.dylib |
|
87 | 87 | CONFIG(debug, debug|release) { |
|
88 | 88 | CHARTS_LIB_NAME = libQtCommercialChartd.1.dylib |
|
89 | 89 | } |
|
90 | 90 | BIN_TARGET_PATH = "" |
|
91 | 91 | exists ($$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET) { |
|
92 | 92 | BIN_TARGET_PATH = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET |
|
93 | 93 | } |
|
94 | 94 | exists ($$CHART_BUILD_BIN_DIR"/test/"$$TARGET".app/Contents/MacOS/"$$TARGET) { |
|
95 | 95 | # Executable in test folder |
|
96 | 96 | BIN_TARGET_PATH = $$CHART_BUILD_BIN_DIR"/test/"$$TARGET".app/Contents/MacOS/"$$TARGET |
|
97 | 97 | } |
|
98 | 98 | exists ($$CHART_BUILD_BIN_DIR"/test/tst_"$$TARGET".app/Contents/MacOS/tst_"$$TARGET) { |
|
99 | 99 | # Executable in test folder with custom target "tst_NNN" |
|
100 | 100 | BIN_TARGET_PATH = $$CHART_BUILD_BIN_DIR"/test/tst_"$$TARGET".app/Contents/MacOS/tst_"$$TARGET |
|
101 | 101 | } |
|
102 | 102 | exists($$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib") { |
|
103 | 103 | # Plugin |
|
104 | 104 | BIN_TARGET_PATH = $$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib" |
|
105 | 105 | } |
|
106 | 106 | !isEmpty (BIN_TARGET_PATH) { |
|
107 | 107 | QMAKE_POST_LINK += install_name_tool -change $$CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$CHARTS_LIB_NAME $$BIN_TARGET_PATH |
|
108 | 108 | } |
|
109 | 109 | } |
|
110 | 110 | |
|
111 | 111 | }else { |
|
112 | 112 | |
|
113 | 113 | CONFIG += qtcommercialchart |
|
114 | 114 | |
|
115 | 115 | } No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now