@@ -1,102 +1,102 | |||
|
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_ |
|
|
38 | CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_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 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_BIN_DIR |
|
50 | 50 | } |
|
51 | 51 | |
|
52 | 52 | ##################### DEVELOPMENT BUILD ################################################### |
|
53 | 53 | |
|
54 | 54 | development_build: { |
|
55 | 55 | DEFINES+=DEVELOPMENT_BUILD |
|
56 | 56 | CONFIG+=debug_and_release |
|
57 | 57 | } |
|
58 | 58 | |
|
59 | 59 | |
|
60 | 60 | ##################### BUILD CONFIG ######################################################## |
|
61 | 61 | |
|
62 | 62 | !system_build:{ |
|
63 | 63 | |
|
64 | 64 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
65 | 65 | |
|
66 | 66 | !win32: { |
|
67 | 67 | LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR |
|
68 | 68 | }else{ |
|
69 | 69 | win32-msvc*: { |
|
70 | 70 | # hack fix for error: |
|
71 | 71 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" |
|
72 | 72 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR |
|
73 | 73 | }else{ |
|
74 | 74 | LIBS += -L $$CHART_BUILD_LIB_DIR |
|
75 | 75 | } |
|
76 | 76 | } |
|
77 | 77 | |
|
78 | 78 | CONFIG(debug, debug|release) { |
|
79 | 79 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) |
|
80 | 80 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) |
|
81 | 81 | } |
|
82 | 82 | |
|
83 | 83 | LIBS += -l$$LIBRARY_NAME |
|
84 | 84 | |
|
85 | 85 | mac: { |
|
86 | 86 | # This is a hack; we define variables for easier install_name_tool calls from project files of OSX executables/libraries |
|
87 | 87 | # install_name_tool is used to update the dependencies to chart library to match the local build folder |
|
88 | 88 | MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" |
|
89 | 89 | CONFIG(debug, debug|release) { |
|
90 | 90 | MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" |
|
91 | 91 | } |
|
92 | 92 | MAC_POST_LINK_PREFIX = install_name_tool -change $$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME |
|
93 | 93 | MAC_DEMOS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET |
|
94 | 94 | MAC_EXAMPLES_BIN_DIR = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET |
|
95 | 95 | MAC_TESTS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/test/"$$TARGET".app/Contents/MacOS/"$$TARGET |
|
96 | 96 | MAC_AUTOTESTS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/test/tst_"$$TARGET".app/Contents/MacOS/tst_"$$TARGET |
|
97 | 97 | MAC_PLUGINS_BIN_DIR = $$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib" |
|
98 | 98 | } |
|
99 | 99 | |
|
100 | 100 | } else { |
|
101 | 101 | CONFIG += qtcommercialchart |
|
102 | 102 | } |
General Comments 0
You need to be logged in to leave comments.
Login now