@@ -1,49 +1,62 | |||||
1 | integrated_build:{ |
|
1 | integrated_build:{ | |
2 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
2 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR | |
3 |
|
3 | |||
4 | !win32: { |
|
4 | !win32: { | |
5 | LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR |
|
5 | LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR | |
6 | }else{ |
|
6 | }else{ | |
7 | win32-msvc*: { |
|
7 | win32-msvc*: { | |
8 | # hack fix for error: |
|
8 | # hack fix for error: | |
9 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" |
|
9 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" | |
10 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR |
|
10 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR | |
11 | }else{ |
|
11 | }else{ | |
12 | LIBS += -L $$CHART_BUILD_LIB_DIR |
|
12 | LIBS += -L $$CHART_BUILD_LIB_DIR | |
13 | } |
|
13 | } | |
14 | } |
|
14 | } | |
15 |
|
15 | |||
16 | CONFIG(debug, debug|release) { |
|
16 | CONFIG(debug, debug|release) { | |
17 | LIBS += -lQtCommercialChartd |
|
17 | LIBS += -lQtCommercialChartd | |
18 | #this is ugly hack to work around missing rpath, it simply copies lib |
|
18 | #this is ugly hack to work around missing rpath, it simply copies lib | |
19 | win32:{ |
|
19 | win32:{ | |
20 | copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll |
|
20 | copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll | |
21 | copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChartd.dll $$CHART_BUILD_BIN_DIR |
|
21 | copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChartd.dll $$CHART_BUILD_BIN_DIR | |
22 | copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChartd.dll |
|
22 | copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChartd.dll | |
23 | PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll |
|
23 | PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll | |
24 | QMAKE_EXTRA_TARGETS +=copylib |
|
24 | QMAKE_EXTRA_TARGETS +=copylib | |
25 | } |
|
25 | } | |
26 | } else { |
|
26 | } else { | |
27 | LIBS += -lQtCommercialChart |
|
27 | LIBS += -lQtCommercialChart | |
28 |
|
28 | |||
29 | #this is ugly hack to work around missing rpath, it simply copies lib |
|
29 | #this is ugly hack to work around missing rpath, it simply copies lib | |
30 | win32: { |
|
30 | win32: { | |
31 | copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChart |
|
31 | copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChart | |
32 | copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChart.dll $$CHART_BUILD_BIN_DIR |
|
32 | copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChart.dll $$CHART_BUILD_BIN_DIR | |
33 | copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChart.dll |
|
33 | copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChart.dll | |
34 | PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChart |
|
34 | PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChart | |
35 | QMAKE_EXTRA_TARGETS +=copylib |
|
35 | QMAKE_EXTRA_TARGETS +=copylib | |
36 | } |
|
36 | } | |
37 | } |
|
37 | } | |
38 |
|
38 | |||
39 | mac: { |
|
39 | mac: { | |
|
40 | CHARTS_LIB_NAME = libQtCommercialChart.1.dylib | |||
|
41 | CONFIG(debug, debug|release) { | |||
|
42 | CHARTS_LIB_NAME = libQtCommercialChartd.1.dylib | |||
|
43 | } | |||
|
44 | ||||
40 | # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX |
|
45 | # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX | |
41 | exists($$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET) { |
|
46 | exists($$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET) { | |
42 |
QMAKE_POST_LINK+=install_name_tool -change |
|
47 | QMAKE_POST_LINK += install_name_tool -change $$CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$CHARTS_LIB_NAME $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET | |
43 | #message($$QMAKE_POST_LINK) |
|
48 | #message($$QMAKE_POST_LINK) | |
44 | } |
|
49 | } | |
|
50 | ||||
|
51 | # Hack to make qml plugins available as internal build versions and to make the plugins use | |||
|
52 | # the internal version of the QtCommercial Charts library on OSX | |||
|
53 | exists($$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib") { | |||
|
54 | QMAKE_POST_LINK += "$$QMAKE_COPY qmldir $$CHART_BUILD_PLUGIN_DIR &" | |||
|
55 | QMAKE_POST_LINK += "install_name_tool -change $$CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$CHARTS_LIB_NAME $$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib"" | |||
|
56 | # message($$QMAKE_POST_LINK) | |||
|
57 | } | |||
45 | } |
|
58 | } | |
46 |
|
59 | |||
47 | } else { |
|
60 | } else { | |
48 | CONFIG+=qtcommercialchart |
|
61 | CONFIG += qtcommercialchart | |
49 | } |
|
62 | } |
@@ -1,45 +1,43 | |||||
|
1 | TEMPLATE = lib | |||
|
2 | TARGET = qtcommercialchartqml | |||
|
3 | CONFIG += qt plugin | |||
|
4 | QT += declarative | |||
|
5 | ||||
1 | !include( ../common.pri ) { |
|
6 | !include( ../common.pri ) { | |
2 | error( "Couldn't find the common.pri file!" ) |
|
7 | error( "Couldn't find the common.pri file!" ) | |
3 | } |
|
8 | } | |
4 | !include( ../integrated.pri ) { |
|
9 | !include( ../integrated.pri ) { | |
5 | error( "Couldn't find the integrated.pri file !") |
|
10 | error( "Couldn't find the integrated.pri file !") | |
6 | } |
|
11 | } | |
7 |
|
12 | |||
8 | TEMPLATE = lib |
|
|||
9 | TARGET = qtcommercialchartqml |
|
|||
10 | DESTDIR = $$CHART_BUILD_PLUGIN_DIR |
|
13 | DESTDIR = $$CHART_BUILD_PLUGIN_DIR | |
11 | CONFIG += qt plugin |
|
|||
12 | QT += declarative |
|
|||
13 |
|
||||
14 | contains(QT_MAJOR_VERSION, 5) { |
|
14 | contains(QT_MAJOR_VERSION, 5) { | |
15 | # TODO: QtQuick2 not supported by the implementation currently |
|
15 | # TODO: QtQuick2 not supported by the implementation currently | |
16 | DEFINES += QTQUICK2 |
|
16 | DEFINES += QTQUICK2 | |
17 | } |
|
17 | } | |
18 |
|
18 | |||
19 | OBJECTS_DIR = $$CHART_BUILD_DIR/plugin |
|
19 | OBJECTS_DIR = $$CHART_BUILD_DIR/plugin | |
20 | MOC_DIR = $$CHART_BUILD_DIR/plugin |
|
20 | MOC_DIR = $$CHART_BUILD_DIR/plugin | |
21 | UI_DIR = $$CHART_BUILD_DIR/plugin |
|
21 | UI_DIR = $$CHART_BUILD_DIR/plugin | |
22 | RCC_DIR = $$CHART_BUILD_DIR/plugin |
|
22 | RCC_DIR = $$CHART_BUILD_DIR/plugin | |
23 |
|
23 | |||
24 | SOURCES += \ |
|
24 | SOURCES += \ | |
25 | plugin.cpp \ |
|
25 | plugin.cpp \ | |
26 | declarativechart.cpp \ |
|
26 | declarativechart.cpp \ | |
27 | declarativescatterseries.cpp \ |
|
27 | declarativescatterseries.cpp \ | |
28 | scatterelement.cpp \ |
|
28 | scatterelement.cpp \ | |
29 | declarativepieseries.cpp \ |
|
29 | declarativepieseries.cpp \ | |
30 | declarativelineseries.cpp |
|
30 | declarativelineseries.cpp | |
31 | HEADERS += \ |
|
31 | HEADERS += \ | |
32 | declarativechart.h \ |
|
32 | declarativechart.h \ | |
33 | declarativescatterseries.h \ |
|
33 | declarativescatterseries.h \ | |
34 | scatterelement.h \ |
|
34 | scatterelement.h \ | |
35 | declarativepieseries.h \ |
|
35 | declarativepieseries.h \ | |
36 | declarativelineseries.h |
|
36 | declarativelineseries.h | |
37 |
|
37 | |||
38 | QMAKE_POST_LINK = $$QMAKE_COPY qmldir $$CHART_BUILD_PLUGIN_DIR |
|
|||
39 |
|
||||
40 | TARGETPATH = QtCommercial/Chart |
|
38 | TARGETPATH = QtCommercial/Chart | |
41 | target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH |
|
39 | target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH | |
42 | qmldir.files += $$PWD/qmldir |
|
40 | qmldir.files += $$PWD/qmldir | |
43 | qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH |
|
41 | qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH | |
44 |
|
42 | |||
45 | INSTALLS += target qmldir |
|
43 | INSTALLS += target qmldir |
General Comments 0
You need to be logged in to leave comments.
Login now