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