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