diff --git a/integrated.pri b/integrated.pri index 31d1d3d..7665511 100644 --- a/integrated.pri +++ b/integrated.pri @@ -37,13 +37,26 @@ integrated_build:{ } mac: { + CHARTS_LIB_NAME = libQtCommercialChart.1.dylib + CONFIG(debug, debug|release) { + CHARTS_LIB_NAME = libQtCommercialChartd.1.dylib + } + # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX exists($$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET) { - 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 + 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 #message($$QMAKE_POST_LINK) } + + # Hack to make qml plugins available as internal build versions and to make the plugins use + # the internal version of the QtCommercial Charts library on OSX + exists($$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib") { + QMAKE_POST_LINK += "$$QMAKE_COPY qmldir $$CHART_BUILD_PLUGIN_DIR &" + QMAKE_POST_LINK += "install_name_tool -change $$CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$CHARTS_LIB_NAME $$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib"" +# message($$QMAKE_POST_LINK) + } } } else { - CONFIG+=qtcommercialchart + CONFIG += qtcommercialchart } diff --git a/qmlplugin/qmlplugin.pro b/qmlplugin/qmlplugin.pro index 5c4fe88..1496ff7 100644 --- a/qmlplugin/qmlplugin.pro +++ b/qmlplugin/qmlplugin.pro @@ -1,3 +1,8 @@ +TEMPLATE = lib +TARGET = qtcommercialchartqml +CONFIG += qt plugin +QT += declarative + !include( ../common.pri ) { error( "Couldn't find the common.pri file!" ) } @@ -5,12 +10,7 @@ error( "Couldn't find the integrated.pri file !") } -TEMPLATE = lib -TARGET = qtcommercialchartqml DESTDIR = $$CHART_BUILD_PLUGIN_DIR -CONFIG += qt plugin -QT += declarative - contains(QT_MAJOR_VERSION, 5) { # TODO: QtQuick2 not supported by the implementation currently DEFINES += QTQUICK2 @@ -35,8 +35,6 @@ HEADERS += \ declarativepieseries.h \ declarativelineseries.h -QMAKE_POST_LINK = $$QMAKE_COPY qmldir $$CHART_BUILD_PLUGIN_DIR - TARGETPATH = QtCommercial/Chart target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir