src.pro
195 lines
| 6.1 KiB
| text/idl
|
PrologLexer
/ src / src.pro
Michal Klocek
|
r996 | !include( ../config.pri ):error( Couldn't find the config.pri file! ) | ||
Michal Klocek
|
r1021 | |||
Michal Klocek
|
r1041 | ############################# BUILD CONFIG ###################################### | ||
Michal Klocek
|
r1021 | TARGET = $$LIBRARY_NAME | ||
Michal Klocek
|
r39 | DESTDIR = $$CHART_BUILD_LIB_DIR | ||
Michal Klocek
|
r36 | TEMPLATE = lib | ||
Michal Klocek
|
r1021 | QT = core gui | ||
Michal Klocek
|
r1041 | DEFINES += QTCOMMERCIALCHART_LIBRARY | ||
win32:CONFIG+=create_prl | ||||
# treat warnings as errors | ||||
win32-msvc*: { | ||||
QMAKE_CXXFLAGS += /WX | ||||
} else { | ||||
QMAKE_CXXFLAGS += -Werror | ||||
} | ||||
############################# DEPEDENCES ######################################## | ||||
Michal Klocek
|
r1021 | |||
Tero Ahola
|
r606 | win32-msvc*: LIBS += User32.lib | ||
Michal Klocek
|
r1021 | LIBS -= -l$$LIBRARY_NAME | ||
Michal Klocek
|
r1041 | INCLUDEPATH += ../include . | ||
############################# SOURCES ########################################## | ||||
Michal Klocek
|
r1021 | |||
Michal Klocek
|
r478 | SOURCES += \ | ||
Michal Klocek
|
r708 | $$PWD/chartdataset.cpp \ | ||
$$PWD/chartpresenter.cpp \ | ||||
$$PWD/charttheme.cpp \ | ||||
$$PWD/domain.cpp \ | ||||
$$PWD/qchart.cpp \ | ||||
$$PWD/qchartview.cpp \ | ||||
Tero Ahola
|
r988 | $$PWD/qabstractseries.cpp \ | ||
Michal Klocek
|
r708 | $$PWD/chartbackground.cpp \ | ||
Michal Klocek
|
r855 | $$PWD/chart.cpp \ | ||
$$PWD/scroller.cpp | ||||
Michal Klocek
|
r478 | PRIVATE_HEADERS += \ | ||
Michal Klocek
|
r708 | $$PWD/chartdataset_p.h \ | ||
$$PWD/chartitem_p.h \ | ||||
$$PWD/chartpresenter_p.h \ | ||||
$$PWD/charttheme_p.h \ | ||||
$$PWD/domain_p.h \ | ||||
$$PWD/chartbackground_p.h \ | ||||
Michal Klocek
|
r719 | $$PWD/chart_p.h \ | ||
Michal Klocek
|
r740 | $$PWD/chartconfig_p.h \ | ||
Michal Klocek
|
r746 | $$PWD/qchart_p.h \ | ||
Michal Klocek
|
r855 | $$PWD/qchartview_p.h \ | ||
Michal Klocek
|
r938 | $$PWD/scroller_p.h \ | ||
Tero Ahola
|
r988 | $$PWD/qabstractseries_p.h | ||
sauimone
|
r547 | PUBLIC_HEADERS += \ | ||
Michal Klocek
|
r708 | $$PWD/qchart.h \ | ||
$$PWD/qchartglobal.h \ | ||||
Tero Ahola
|
r988 | $$PWD/qabstractseries.h \ | ||
Michal Klocek
|
r957 | $$PWD/qchartview.h | ||
Michal Klocek
|
r530 | |||
Michal Klocek
|
r957 | include(animations/animations.pri) | ||
include(areachart/areachart.pri) | ||||
Michal Klocek
|
r478 | include(axis/axis.pri) | ||
Michal Klocek
|
r360 | include(barchart/barchart.pri) | ||
Michal Klocek
|
r957 | include(legend/legend.pri) | ||
include(linechart/linechart.pri) | ||||
Jani Honkonen
|
r146 | include(piechart/piechart.pri) | ||
Tero Ahola
|
r194 | include(scatterseries/scatter.pri) | ||
Marek Rosa
|
r295 | include(splinechart/splinechart.pri) | ||
Michal Klocek
|
r708 | include(themes/themes.pri) | ||
Michal Klocek
|
r957 | include(xychart/xychart.pri) | ||
Tero Ahola
|
r584 | |||
Tero Ahola
|
r194 | HEADERS += $$PUBLIC_HEADERS | ||
Michal Klocek
|
r36 | HEADERS += $$PRIVATE_HEADERS | ||
Michal Klocek
|
r143 | HEADERS += $$THEMES | ||
Michal Klocek
|
r1041 | |||
############################# BUILD PATH ########################################## | ||||
Michal Klocek
|
r740 | |||
Michal Klocek
|
r39 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib | ||
MOC_DIR = $$CHART_BUILD_DIR/lib | ||||
UI_DIR = $$CHART_BUILD_DIR/lib | ||||
RCC_DIR = $$CHART_BUILD_DIR/lib | ||||
Michal Klocek
|
r588 | |||
Michal Klocek
|
r1041 | ############################# PUBLIC HEADERS GENERTOR ########################################## | ||
Michal Klocek
|
r603 | #this is very primitive and lame parser , TODO: make perl script insted | ||
Michal Klocek
|
r711 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) | ||
Michal Klocek
|
r591 | { | ||
Michal Klocek
|
r603 | system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR) | ||
Michal Klocek
|
r711 | win32:{ | ||
command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" | ||||
}else{ | ||||
command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" | ||||
} | ||||
Michal Klocek
|
r996 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal | ||
Michal Klocek
|
r711 | system($$command) | ||
Michal Klocek
|
r591 | } | ||
Michal Klocek
|
r588 | for(file, PUBLIC_HEADERS) { | ||
name = $$split(file,'/') | ||||
name = $$last(name) | ||||
class = "$$cat($$file)" | ||||
class = $$find(class,class) | ||||
!isEmpty(class){ | ||||
class = $$split(class,QTCOMMERCIALCHART_EXPORT) | ||||
class = $$member(class,1) | ||||
Michal Klocek
|
r589 | class = $$split(class,' ') | ||
Michal Klocek
|
r588 | class = $$replace(class,' ','') | ||
class = $$member(class,0) | ||||
Michal Klocek
|
r627 | win32:{ | ||
command = "echo $${LITERAL_HASH}include \"$$name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" | ||||
}else{ | ||||
command = "echo \"$${LITERAL_HASH}include \\\"$$name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" | ||||
} | ||||
Michal Klocek
|
r588 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class | ||
Michal Klocek
|
r591 | system($$command) | ||
Michal Klocek
|
r588 | } | ||
} | ||||
Michal Klocek
|
r1041 | ############################# INSTALLERS ########################################## | ||
Michal Klocek
|
r36 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart | ||
Michal Klocek
|
r588 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS | ||
Michal Klocek
|
r1041 | INSTALLS += public_headers | ||
Michal Klocek
|
r588 | |||
install_build_public_headers.name = build_public_headers | ||||
Michal Klocek
|
r193 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h | ||
install_build_public_headers.input = PUBLIC_HEADERS | ||||
install_build_public_headers.commands = $$QMAKE_COPY \ | ||||
Michal Klocek
|
r145 | ${QMAKE_FILE_NAME} \ | ||
Michal Klocek
|
r193 | $$CHART_BUILD_PUBLIC_HEADER_DIR | ||
install_build_public_headers.CONFIG += target_predeps \ | ||||
Michal Klocek
|
r145 | no_link | ||
Michal Klocek
|
r588 | |||
install_build_private_headers.name = buld_private_headers | ||||
Michal Klocek
|
r193 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h | ||
install_build_private_headers.input = PRIVATE_HEADERS | ||||
install_build_private_headers.commands = $$QMAKE_COPY \ | ||||
${QMAKE_FILE_NAME} \ | ||||
$$CHART_BUILD_PRIVATE_HEADER_DIR | ||||
install_build_private_headers.CONFIG += target_predeps \ | ||||
no_link | ||||
Michal Klocek
|
r588 | |||
Michal Klocek
|
r360 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ | ||
Michal Klocek
|
r588 | install_build_private_headers \ | ||
Michal Klocek
|
r1041 | target.path=$$[QT_INSTALL_LIBS] | ||
INSTALLS += target | ||||
win32:{ | ||||
dlltarget.commands = $(COPY_FILE) $(DESTDIR_TARGET) $$[QT_INSTALL_BINS] | ||||
DLLDESTDIR = $$CHART_BUILD_BIN_DIR | ||||
dlltarget.path=$$[QT_INSTALL_BINS] | ||||
target.files= ..\\lib\\*.a ..\\lib\\*.prl | ||||
INSTALLS += dlltarget | ||||
} | ||||
################################ DEVELOPMENT BUILD ########################################## | ||||
Michal Klocek
|
r996 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. | ||
# This is the case at least with shadow builds. | ||||
# http://qt-project.org/wiki/jom | ||||
Michal Klocek
|
r715 | |||
Michal Klocek
|
r998 | development_build:!win32-msvc*:{ | ||
Jani Honkonen
|
r808 | chartversion.target = $$PWD/qchartversion_p.h | ||
unix:{ | ||||
chartversion.commands = @echo \ | ||||
Michal Klocek
|
r996 | \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\ | ||
$${LITERAL_HASH}define QCHARTVERSION_P_H\\n\ | ||||
const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\ | ||||
const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \ | ||||
$${LITERAL_HASH}endif \" \ | ||||
Jani Honkonen
|
r808 | > \ | ||
$$chartversion.target; | ||||
}else{ | ||||
chartversion.commands = @echo \ | ||||
"const char *buildTime = \"%date%_%time%\" ; \ | ||||
const char *gitHead = \"unknown\" ; " \ | ||||
> \ | ||||
$$chartversion.target | ||||
} | ||||
chartversion.depends = $$HEADERS \ | ||||
$$SOURCES | ||||
Michal Klocek
|
r996 | PRE_TARGETDEPS += $$chartversion.target | ||
Jani Honkonen
|
r808 | QMAKE_CLEAN += $$PWD/qchartversion_p.h | ||
QMAKE_EXTRA_TARGETS += chartversion | ||||
Michal Klocek
|
r715 | } | ||
Jani Honkonen
|
r808 | |||
Michal Klocek
|
r1041 | ############################### CLEAN ########################################### | ||
Michal Klocek
|
r145 | unix:QMAKE_DISTCLEAN += -r \ | ||
$$CHART_BUILD_HEADER_DIR \ | ||||
$$CHART_BUILD_LIB_DIR | ||||
win32:QMAKE_DISTCLEAN += /Q \ | ||||
$$CHART_BUILD_HEADER_DIR \ | ||||
$$CHART_BUILD_LIB_DIR | ||||
Michal Klocek
|
r588 | |||