@@ -1,59 +1,48 | |||
|
1 | 1 | !include(config.pri) { |
|
2 | 2 | error('Missing config.pri') |
|
3 | 3 | } |
|
4 | 4 | |
|
5 | 5 | TEMPLATE = subdirs |
|
6 | 6 | SUBDIRS = src plugins examples demos tests |
|
7 | 7 | |
|
8 | 8 | development_build: message('Development build') |
|
9 | 9 | |
|
10 | !system_build:{ | |
|
11 | message('Configured for local build against local libs...') | |
|
12 | message('You can run "make" to build qchart library, examples, demos and plugin...') | |
|
13 | message('You can run "make install" to install qchart in qt sdk...') | |
|
14 | } else { | |
|
15 | message('Running build aginst system libs...') | |
|
16 | message('Building only charts library...') | |
|
17 | message('Afterwards you can run "cd examples; qmake ; make " to build examples.') | |
|
18 | SUBDIRS = src | |
|
19 | } | |
|
20 | ||
|
21 | 10 | CONFIG += ordered |
|
22 | 11 | QMAKE_CXXFLAGS += -g -Wall |
|
23 | 12 | unix:QMAKE_DISTCLEAN += -r build bin include lib doc/html |
|
24 | 13 | win32:QMAKE_DISTCLEAN += /Q /s build bin include lib doc\\html |
|
25 | 14 | |
|
26 | 15 | # install feature file |
|
27 | 16 | feature.path = $$[QT_INSTALL_DATA]/mkspecs/features |
|
28 | 17 | feature.files = $$PWD/features/qtcommercialchart.prf |
|
29 | 18 | INSTALLS += feature |
|
30 | 19 | |
|
31 | 20 | docs.target = docs |
|
32 | 21 | win32:{ |
|
33 | 22 | docs.commands = qdoc3 $$CHART_BUILD_DOC_DIR\\qcharts.qdocconf |
|
34 | 23 | }else{ |
|
35 | 24 | docs.commands = qdoc3 $$CHART_BUILD_DOC_DIR/qcharts.qdocconf |
|
36 | 25 | } |
|
37 | 26 | docs.depends = FORCE |
|
38 | 27 | QMAKE_EXTRA_TARGETS += docs |
|
39 | 28 | |
|
40 | 29 | unix:coverage:{ |
|
41 | 30 | QMAKE_DISTCLEAN += -r ./coverage |
|
42 | 31 | QMAKE_CLEAN += build/*.gcda build/*.gcno |
|
43 | 32 | QMAKE_EXTRA_TARGETS += buildcoverage runcoverage gencoverage |
|
44 | 33 | |
|
45 | 34 | buildcoverage.target = build_coverage |
|
46 | 35 | buildcoverage.depends = all |
|
47 | 36 | buildcoverage.commands = mkdir -p ./coverage; \ |
|
48 | 37 | make -C src prepare_coverage; |
|
49 | 38 | |
|
50 | 39 | runcoverage.target = run_coverage |
|
51 | 40 | runcoverage.depends = buildcoverage |
|
52 | 41 | runcoverage.commands = for f in `ls ./bin/tst_*` ; do echo "processing \$\$f test..."; \$\$f >> unit.log; done ; exit 0; |
|
53 | 42 | |
|
54 | 43 | gencoverage.target = gen_coverage |
|
55 | 44 | gencoverage.depends = runcoverage |
|
56 | 45 | gencoverage.commands = make -C src gen_coverage; \ |
|
57 | 46 | genhtml -o ./coverage ./coverage/coverage.info --prefix $$PWD |
|
58 | 47 | } |
|
59 | 48 |
@@ -1,97 +1,92 | |||
|
1 | 1 | |
|
2 | 2 | LIBRARY_NAME = QtCommercialChart |
|
3 | coverage: CONFIG+=debug | |
|
3 | CONFIG(debug, debug|release) { | |
|
4 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) | |
|
5 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) | |
|
6 | } | |
|
7 | ||
|
8 | coverage: CONFIG += debug | |
|
4 | 9 | |
|
5 | 10 | ##################### SHADOW CONFIG ################################################# |
|
6 | 11 | |
|
7 | 12 | !contains($${PWD}, $${OUT_PWD}){ |
|
8 | 13 | search = "$$PWD:::" |
|
9 | 14 | temp = $$split(search,"/") |
|
10 | 15 | temp = $$last(temp) |
|
11 | 16 | path = $$replace(search,$$temp,'') |
|
12 | 17 | temp = $$split(OUT_PWD,$$path) |
|
13 | 18 | temp = $$split(temp,'/') |
|
14 | 19 | temp = $$first(temp) |
|
15 | 20 | path = "$${path}$${temp}" |
|
16 | 21 | SHADOW=$$path |
|
17 | 22 | }else{ |
|
18 | 23 | SHADOW=$$PWD |
|
19 | 24 | CONFIG-=development_build |
|
20 | 25 | } |
|
21 | 26 | |
|
22 | 27 | ##################### BUILD PATHS ################################################## |
|
23 | 28 | |
|
24 | 29 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include |
|
25 | 30 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private |
|
26 | 31 | CHART_BUILD_LIB_DIR = $$SHADOW/lib |
|
27 | 32 | CHART_BUILD_DIR = $$SHADOW/build |
|
28 | 33 | CHART_BUILD_BIN_DIR = $$SHADOW/bin |
|
29 | 34 | CHART_BUILD_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR/QtCommercial/Chart |
|
30 | 35 | CHART_BUILD_DOC_DIR = $$SHADOW/doc |
|
31 | 36 | |
|
32 | 37 | # Use own folders for debug and release builds |
|
33 | 38 | CONFIG(debug, debug|release):CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/debug) |
|
34 | 39 | CONFIG(release, debug|release): CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/release) |
|
35 | 40 | |
|
36 | 41 | win32:{ |
|
37 | 42 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") |
|
38 | 43 | CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") |
|
39 | 44 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") |
|
40 | 45 | CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") |
|
41 | 46 | CHART_BUILD_PLUGIN_DIR = $$replace(CHART_BUILD_PLUGIN_DIR, "/","\\") |
|
42 | 47 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") |
|
43 | 48 | CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\") |
|
44 | 49 | } |
|
45 | 50 | |
|
46 | 51 | mac: { |
|
47 | 52 | # TODO: The following qmake flags are a work-around to make QtCommercial Charts compile on |
|
48 | 53 | # QtCommercial 4.8. On the other hand Charts builds successfully with Qt open source 4.8 |
|
49 | 54 | # without these definitions, so this is probably a configuration issue on QtCommercial 4.8; |
|
50 | 55 | # it should probably define the minimum OSX version to be 10.5... |
|
51 | 56 | QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 |
|
52 | 57 | QMAKE_LFLAGS *= -mmacosx-version-min=10.5 |
|
53 | 58 | } |
|
54 | 59 | |
|
55 | 60 | ##################### DEVELOPMENT BUILD ################################################### |
|
56 | 61 | |
|
57 | 62 | development_build: { |
|
58 | 63 | DEFINES+=DEVELOPMENT_BUILD |
|
59 | 64 | CONFIG+=debug_and_release |
|
60 | 65 | } |
|
61 | 66 | |
|
62 | 67 | |
|
63 | 68 | ##################### BUILD CONFIG ######################################################## |
|
64 | 69 | |
|
65 | CONFIG(debug, debug|release) { | |
|
66 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) | |
|
67 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) | |
|
68 | } | |
|
69 | ||
|
70 | !system_build:{ | |
|
71 | ||
|
72 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR | |
|
70 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR | |
|
73 | 71 | |
|
74 |
|
|
|
75 |
|
|
|
72 | !win32: { | |
|
73 | LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR | |
|
74 | } else { | |
|
75 | win32-msvc*: { | |
|
76 | # hack fix for error: | |
|
77 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" | |
|
78 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR | |
|
76 | 79 | } else { |
|
77 | win32-msvc*: { | |
|
78 | # hack fix for error: | |
|
79 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" | |
|
80 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR | |
|
81 | } else { | |
|
82 | LIBS += -L $$CHART_BUILD_LIB_DIR | |
|
83 | } | |
|
80 | LIBS += -L $$CHART_BUILD_LIB_DIR | |
|
84 | 81 | } |
|
85 | ||
|
86 | LIBS += -l$$LIBRARY_NAME | |
|
87 | } else { | |
|
88 | CONFIG += qtcommercialchart | |
|
89 | 82 | } |
|
90 | 83 | |
|
84 | LIBS += -l$$LIBRARY_NAME | |
|
85 | ||
|
91 | 86 | ##################### UNIT TESTS ############################################################## |
|
92 | 87 | |
|
93 | 88 | CONFIG(debug, debug|release) { |
|
94 | 89 | CONFIG+=test_private |
|
95 | 90 | DEFINES+=BUILD_PRIVATE_UNIT_TESTS |
|
96 | 91 | } |
|
97 | 92 |
General Comments 0
You need to be logged in to leave comments.
Login now