diff --git a/charts.pro b/charts.pro index e8410a0..313d47a 100644 --- a/charts.pro +++ b/charts.pro @@ -1,5 +1,9 @@ +!include(common.pri) { + error('missing common.pri') +} + TEMPLATE = subdirs -SUBDIRS += src example #qmlplugin +SUBDIRS += src example test CONFIG += ordered QMAKE_CXXFLAGS += -g -Wall QMAKE_DISTCLEAN += -r build bin diff --git a/common.pri b/common.pri index 9185773..4d7f581 100644 --- a/common.pri +++ b/common.pri @@ -1,6 +1,8 @@ +CONFIG+=internal_build #remove if you want to build against installed libs + CHART_BUILD_HEADER_DIR = $$PWD/include CHART_BUILD_LIB_DIR = $$PWD/lib CHART_BUILD_DIR = $$PWD/build CHART_BUILD_BIN = $$PWD/bin -CONFIG+=build_examples + diff --git a/example/linechart/linechart.pro b/example/linechart/linechart.pro index 36601da..35a439e 100644 --- a/example/linechart/linechart.pro +++ b/example/linechart/linechart.pro @@ -1,13 +1,15 @@ -CONFIG += internal_build +!include( ../../common.pri ) { + error( Couldn't find the common.pri file! ) +} + +!include( ../../internal.pri ) { + error( Couldn't find the internal.pri file !) +} TARGET = lineChart TEMPLATE = app QT += core gui SOURCES += main.cpp -!include( ../../common.pri ) { - message('missing common pri') - CONFIG += qtcommercialchart -} diff --git a/example/example.pri b/internal.pri similarity index 83% rename from example/example.pri rename to internal.pri index 258cb9a..067c473 100644 --- a/example/example.pri +++ b/internal.pri @@ -1,12 +1,13 @@ -build_examples:{ +internal_build:{ message('Internal build within charts core source tree') INCLUDEPATH += $$CHART_BUILD_HEADER_DIR LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR DESTDIR = $$CHART_BUILD_BIN CONFIG(debug, debug|release) { LIBS += -lQtCommercialChartd -} else { + } else { LIBS += -lQtCommercialChart -} - + } +}else{ + CONFIG+=qtcommercialchart } diff --git a/src/src.pro b/src/src.pro index 1e763d0..d93f31b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -2,11 +2,13 @@ error( Couldn't find the common.pri file! ) } + TARGET = QtCommercialChart DESTDIR = $$CHART_BUILD_LIB_DIR TEMPLATE = lib QT += core \ gui +CONFIG -= internal_build CONFIG += debug_and_release CONFIG(debug, debug|release):TARGET = QtCommercialChartd diff --git a/test/chartwidgettest/chartwidgettest.pro b/test/chartwidgettest/chartwidgettest.pro index a301da6..8142462 100644 --- a/test/chartwidgettest/chartwidgettest.pro +++ b/test/chartwidgettest/chartwidgettest.pro @@ -1,3 +1,12 @@ +!include( ../../common.pri ) { +error( Couldn't find the common.pri file! ) +} + +!include( ../../internal.pri ) { +error( Couldn't find the internal.pri file! ) +} + + TARGET = chartwidgettest TEMPLATE = app @@ -6,7 +15,6 @@ contains(QT_MAJOR_VERSION, 5) { QT += widgets } -CONFIG += qtcommercialchart OBJECTS_DIR = tmp MOC_DIR = tmp @@ -22,12 +30,4 @@ HEADERS += \ # qscatterseries.h \ # qseriespointgraphicsitem.h \ dataseriedialog.h - - - - - - - - - + diff --git a/test/test.pro b/test/test.pro new file mode 100644 index 0000000..22ca591 --- /dev/null +++ b/test/test.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS += chartwidgettest