diff --git a/charts.pro b/charts.pro index 130f9c4..e8410a0 100644 --- a/charts.pro +++ b/charts.pro @@ -1,10 +1,10 @@ -TEMPLATE = subdirs -SUBDIRS += src #qmlplugin - -QMAKE_CXXFLAGS += -g -Wall -QMAKE_DISTCLEAN += -r build - -# install feature file -feature.path = $$[QT_INSTALL_DATA]/mkspecs/features -feature.files = $$PWD/features/qtcommercialchart.prf -INSTALLS += feature +TEMPLATE = subdirs +SUBDIRS += src example #qmlplugin +CONFIG += ordered +QMAKE_CXXFLAGS += -g -Wall +QMAKE_DISTCLEAN += -r build bin + +# install feature file +feature.path = $$[QT_INSTALL_DATA]/mkspecs/features +feature.files = $$PWD/features/qtcommercialchart.prf +INSTALLS += feature diff --git a/example/example.pro b/example/example.pro index 1c2d9eb..2d04f82 100644 --- a/example/example.pro +++ b/example/example.pro @@ -1,2 +1,2 @@ TEMPLATE = subdirs -SUBDIRS += linechart \ No newline at end of file +SUBDIRS += linechart diff --git a/example/linechart/linechart.pro b/example/linechart/linechart.pro index 1e1ebc3..36601da 100644 --- a/example/linechart/linechart.pro +++ b/example/linechart/linechart.pro @@ -1,8 +1,13 @@ +CONFIG += internal_build + TARGET = lineChart TEMPLATE = app - QT += core gui +SOURCES += main.cpp + +!include( ../../common.pri ) { + message('missing common pri') + CONFIG += qtcommercialchart +} -CONFIG += qtcommercialchart -SOURCES += main.cpp diff --git a/src/src.pro b/src/src.pro index 7305006..1e763d0 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,4 +1,9 @@ +!include( ../common.pri ) { +error( Couldn't find the common.pri file! ) +} + TARGET = QtCommercialChart +DESTDIR = $$CHART_BUILD_LIB_DIR TEMPLATE = lib QT += core \ gui @@ -33,10 +38,12 @@ HEADERS += $$PRIVATE_HEADERS INCLUDEPATH += xylinechart \ . -OBJECTS_DIR = ../build/lib -MOC_DIR = ../build/lib -UI_DIR = ../build/lib -RCC_DIR = ../build/lib +OBJECTS_DIR = $$CHART_BUILD_DIR/lib +MOC_DIR = $$CHART_BUILD_DIR/lib +UI_DIR = $$CHART_BUILD_DIR/lib +RCC_DIR = $$CHART_BUILD_DIR/lib + + DEFINES += QTCOMMERCIALCHART_LIBRARY public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart @@ -45,5 +52,19 @@ target.path = $$[QT_INSTALL_LIBS] INSTALLS += target \ public_headers - - + +install_build_headers.name = bild_headers +install_build_headers.output = $$CHART_BUILD_HEADER_DIR/${QMAKE_FILE_BASE}.h +install_build_headers.input = PUBLIC_HEADERS +install_build_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} $$CHART_BUILD_HEADER_DIR +install_build_headers.CONFIG += target_predeps no_link +QMAKE_EXTRA_COMPILERS += install_build_headers + +chartversion.target = qchartversion_p.h +chartversion.commands = @echo "build_time" > $$chartversion.target; +chartversion.depends = $$HEADERS $$SOURCES +PRE_TARGETDEPS += qchartversion_p.h +QMAKE_CLEAN+= qchartversion_p.h +QMAKE_EXTRA_TARGETS += chartversion + +QMAKE_DISTCLEAN += -r $$CHART_BUILD_HEADER_DIR $$CHART_BUILD_LIB_DIR \ No newline at end of file