@@ -24,14 +24,17 licenses/ | |||||
24 | Building |
|
24 | Building | |
25 | ======== |
|
25 | ======== | |
26 |
|
26 | |||
27 | Configure project with qmake: |
|
27 | Configure project with qmake. On Windows by default both debug and release | |
28 | qmake CONFIG+=release |
|
28 | versions are built. On other platforms you need to specify the version | |
|
29 | (default is debug): | |||
|
30 | (Windows) qmake | |||
|
31 | (Other platforms) qmake CONFIG+=release | |||
29 |
|
32 | |||
30 | Build poject with make: |
|
33 | Build poject with make: | |
31 | (Linux) make |
|
34 | (Linux) make | |
32 | (Windows with MinGw) mingw32-make |
|
35 | (Windows with MinGw) mingw32-make | |
33 | (Visual Studio) nmake |
|
36 | (Visual Studio) nmake | |
34 |
|
|
37 | (OSX) make | |
35 |
|
38 | |||
36 | If you want to install the libraries to your Qt library directory use: |
|
39 | If you want to install the libraries to your Qt library directory use: | |
37 | make install |
|
40 | make install | |
@@ -39,6 +42,12 If you want to install the libraries to your Qt library directory use: | |||||
39 | If you want to uninstall the libraries |
|
42 | If you want to uninstall the libraries | |
40 | make uninstall |
|
43 | make uninstall | |
41 |
|
44 | |||
|
45 | Building as a statically linked library | |||
|
46 | ======================================= | |||
|
47 | ||||
|
48 | The same as above applies you will just have to add staticlib to the CONFIG: | |||
|
49 | qmake CONFIG+=staticlib | |||
|
50 | ||||
42 | Documentation |
|
51 | Documentation | |
43 | ============= |
|
52 | ============= | |
44 |
|
53 |
@@ -83,6 +83,10 INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR | |||||
83 |
|
83 | |||
84 | LIBS += -l$$LIBRARY_NAME |
|
84 | LIBS += -l$$LIBRARY_NAME | |
85 |
|
85 | |||
|
86 | # This will undefine Q_DECL_EXPORT/Q_DECL_IMPORT at qchartglobal.h | |||
|
87 | # They should not be used for staticlib builds. | |||
|
88 | staticlib:DEFINES+=QTCOMMERCIALCHART_STATICLIB | |||
|
89 | ||||
86 | ##################### UNIT TESTS ############################################################## |
|
90 | ##################### UNIT TESTS ############################################################## | |
87 |
|
91 | |||
88 | CONFIG(debug, debug|release) { |
|
92 | CONFIG(debug, debug|release) { |
@@ -9,4 +9,7 UI_DIR = $$CHART_BUILD_DIR/demos/$$TARGET | |||||
9 | RCC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET |
|
9 | RCC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET | |
10 |
|
10 | |||
11 | TEMPLATE = app |
|
11 | TEMPLATE = app | |
12 | QT += core gui No newline at end of file |
|
12 | QT += core gui | |
|
13 | ||||
|
14 | # staticlib config causes problems when building executables | |||
|
15 | staticlib: CONFIG-=staticlib |
@@ -9,4 +9,7 UI_DIR = $$CHART_BUILD_DIR/examples/$$TARGET | |||||
9 | RCC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET |
|
9 | RCC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET | |
10 |
|
10 | |||
11 | TEMPLATE = app |
|
11 | TEMPLATE = app | |
12 | QT += core gui No newline at end of file |
|
12 | QT += core gui | |
|
13 | ||||
|
14 | # staticlib config causes problems when building executables | |||
|
15 | staticlib: CONFIG-=staticlib |
@@ -11,3 +11,6 OBJECTS_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET | |||||
11 | MOC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET |
|
11 | MOC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET | |
12 | UI_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET |
|
12 | UI_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET | |
13 | RCC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET |
|
13 | RCC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET | |
|
14 | ||||
|
15 | # staticlib config causes problems when building executables | |||
|
16 | staticlib: CONFIG-=staticlib |
@@ -31,32 +31,38 | |||||
31 | #endif |
|
31 | #endif | |
32 |
|
32 | |||
33 | #if defined(BUILD_PRIVATE_UNIT_TESTS) && defined(QTCOMMERCIALCHART_LIBRARY) |
|
33 | #if defined(BUILD_PRIVATE_UNIT_TESTS) && defined(QTCOMMERCIALCHART_LIBRARY) | |
34 |
# |
|
34 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_EXPORT | |
35 | #elif defined(BUILD_PRIVATE_UNIT_TESTS) && !defined(QTCOMMERCIALCHART_LIBRARY) |
|
35 | #elif defined(BUILD_PRIVATE_UNIT_TESTS) && !defined(QTCOMMERCIALCHART_LIBRARY) | |
36 |
# |
|
36 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_IMPORT | |
37 | #else |
|
37 | #else | |
38 |
# |
|
38 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT | |
|
39 | #endif | |||
|
40 | ||||
|
41 | #ifdef QTCOMMERCIALCHART_STATICLIB | |||
|
42 | # undef QTCOMMERCIALCHART_EXPORT | |||
|
43 | # undef QTCOMMERCIALCHART_AUTOTEST_EXPORT | |||
|
44 | # define QTCOMMERCIALCHART_EXPORT | |||
|
45 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT | |||
39 | #endif |
|
46 | #endif | |
40 |
|
47 | |||
41 | #define QTCOMMERCIALCHART_NAMESPACE QtCommercialChart |
|
48 | #define QTCOMMERCIALCHART_NAMESPACE QtCommercialChart | |
42 |
|
49 | |||
43 | #ifdef QTCOMMERCIALCHART_NAMESPACE |
|
50 | #ifdef QTCOMMERCIALCHART_NAMESPACE | |
44 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE namespace QTCOMMERCIALCHART_NAMESPACE { |
|
51 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE namespace QTCOMMERCIALCHART_NAMESPACE { | |
45 | # define QTCOMMERCIALCHART_END_NAMESPACE } |
|
52 | # define QTCOMMERCIALCHART_END_NAMESPACE } | |
46 | # define QTCOMMERCIALCHART_USE_NAMESPACE using namespace QTCOMMERCIALCHART_NAMESPACE; |
|
53 | # define QTCOMMERCIALCHART_USE_NAMESPACE using namespace QTCOMMERCIALCHART_NAMESPACE; | |
47 | #else |
|
54 | #else | |
48 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
55 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
49 | # define QTCOMMERCIALCHART_END_NAMESPACE |
|
56 | # define QTCOMMERCIALCHART_END_NAMESPACE | |
50 | # define QTCOMMERCIALCHART_USE_NAMESPACE |
|
57 | # define QTCOMMERCIALCHART_USE_NAMESPACE | |
51 | #endif |
|
58 | #endif | |
52 |
|
59 | |||
53 | #if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG) |
|
60 | #if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG) | |
54 | #define CHART_DEBUG chartDebug(3,__LINE__,__FILE__,__FUNCTION__) |
|
|||
55 |
|
||||
56 |
|
||||
57 | #include <stdarg.h> |
|
61 | #include <stdarg.h> | |
58 | #include <QDebug> |
|
62 | #include <QDebug> | |
59 |
|
63 | |||
|
64 | #define CHART_DEBUG chartDebug(3,__LINE__,__FILE__,__FUNCTION__) | |||
|
65 | ||||
60 | static inline QDebug chartDebug(int numargs,...) |
|
66 | static inline QDebug chartDebug(int numargs,...) | |
61 | { |
|
67 | { | |
62 | va_list valist; |
|
68 | va_list valist; | |
@@ -69,4 +75,5 static inline QDebug chartDebug(int numargs,...) | |||||
69 | return qDebug()<<QString().append(function).append("(").append(file).append(":%1)").arg(line); |
|
75 | return qDebug()<<QString().append(function).append("(").append(file).append(":%1)").arg(line); | |
70 | } |
|
76 | } | |
71 | #endif |
|
77 | #endif | |
72 | #endif |
|
78 | ||
|
79 | #endif // CHARTGLOBAL_H |
@@ -151,7 +151,9 QMAKE_EXTRA_COMPILERS += install_build_public_headers \ | |||||
151 |
|
151 | |||
152 | win32:{ |
|
152 | win32:{ | |
153 | bintarget.CONFIG += no_check_exist |
|
153 | bintarget.CONFIG += no_check_exist | |
154 | bintarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.dll |
|
154 | !staticlib: { | |
|
155 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.dll | |||
|
156 | } | |||
155 | win32-msvc*:CONFIG(debug, debug|release): { |
|
157 | win32-msvc*:CONFIG(debug, debug|release): { | |
156 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.pdb |
|
158 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.pdb | |
157 | } |
|
159 | } |
@@ -9,3 +9,6 OBJECTS_DIR = $$CHART_BUILD_DIR/tests/$$TARGET | |||||
9 | MOC_DIR = $$CHART_BUILD_DIR/tests/$$TARGET |
|
9 | MOC_DIR = $$CHART_BUILD_DIR/tests/$$TARGET | |
10 | UI_DIR = $$CHART_BUILD_DIR/tests/$$TARGET |
|
10 | UI_DIR = $$CHART_BUILD_DIR/tests/$$TARGET | |
11 | RCC_DIR = $$CHART_BUILD_DIR/tests/$$TARGET |
|
11 | RCC_DIR = $$CHART_BUILD_DIR/tests/$$TARGET | |
|
12 | ||||
|
13 | # staticlib config causes problems when building executables | |||
|
14 | staticlib: CONFIG-=staticlib |
General Comments 0
You need to be logged in to leave comments.
Login now