0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-23 16:22:58 +03:00
LimeReport/limereport/limereport.pro

145 lines
3.9 KiB
Prolog
Raw Permalink Normal View History

DEFINES += DEFAULT_ITEM_PADDING=0
2021-08-18 20:14:37 +03:00
CONFIG(debug, debug|release) {
TARGET = limereportd
} else {
TARGET = limereport
}
2016-03-21 04:12:30 +03:00
TEMPLATE = lib
2016-02-17 10:11:00 +03:00
2021-08-18 20:14:37 +03:00
CONFIG(static_build) {
CONFIG += staticlib
}
2021-08-18 20:14:37 +03:00
!CONFIG(staticlib) {
CONFIG += lib
CONFIG += dll
}
2016-03-21 04:12:30 +03:00
CONFIG += create_prl
CONFIG += link_prl
2016-03-24 17:10:44 +03:00
macx{
2021-08-18 20:14:37 +03:00
CONFIG -= dll
CONFIG += lib_bundle
CONFIG += plugin
2016-03-24 17:10:44 +03:00
}
2016-03-21 04:12:30 +03:00
2017-06-14 12:07:02 +03:00
DEFINES += LIMEREPORT_EXPORTS
2017-06-12 13:11:00 +03:00
2021-08-18 20:14:37 +03:00
CONFIG(staticlib) {
2017-06-12 13:11:00 +03:00
DEFINES += HAVE_STATIC_BUILD
2021-02-03 22:00:14 +03:00
DEFINES += QZINT_STATIC_BUILD
2017-06-12 13:11:00 +03:00
message(STATIC_BUILD)
2017-06-14 12:07:02 +03:00
DEFINES -= LIMEREPORT_EXPORTS
2017-06-12 13:11:00 +03:00
}
2016-03-21 04:12:30 +03:00
EXTRA_FILES += \
$$PWD/lrglobal.h \
2019-01-24 22:10:15 +03:00
$$PWD/lrdatasourceintf.h \
2016-03-21 04:12:30 +03:00
$$PWD/lrdatasourcemanagerintf.h \
$$PWD/lrreportengine.h \
$$PWD/lrscriptenginemanagerintf.h \
$$PWD/lrcallbackdatasourceintf.h \
2017-11-27 23:14:05 +03:00
$$PWD/lrpreviewreportwidget.h \
$$PWD/lrreportdesignwindowintrerface.h \
$$PWD/lrpreparedpagesintf.h
2016-03-21 04:12:30 +03:00
2016-03-24 17:10:44 +03:00
include(limereport.pri)
unix:{
2021-08-18 20:14:37 +03:00
DESTDIR = $${DEST_LIBS}
2016-03-31 16:15:55 +03:00
linux{
2020-05-12 14:11:58 +03:00
QMAKE_POST_LINK += mkdir -p \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/
2021-08-18 20:14:37 +03:00
for(FILE,EXTRA_FILES) {
2020-05-12 14:11:58 +03:00
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # inside of libs make /include/files
2016-03-31 16:15:55 +03:00
}
2016-03-21 04:12:30 +03:00
}
2016-03-31 16:15:55 +03:00
macx{
2021-08-18 20:14:37 +03:00
for(FILE,EXTRA_FILES) {
2020-05-12 14:11:58 +03:00
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t)
2016-03-31 16:15:55 +03:00
}
2020-05-12 14:11:58 +03:00
QMAKE_POST_LINK += mkdir -p \"$${DESTDIR}/include\" $$escape_expand(\\n\\t)
2016-03-31 16:15:55 +03:00
}
2020-05-12 14:11:58 +03:00
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DESTDIR}\"
2016-03-21 04:12:30 +03:00
}
win32 {
2016-04-03 16:33:41 +03:00
DESTDIR = $${DEST_LIBS}
2021-08-18 20:14:37 +03:00
contains(QMAKE_HOST.os, Linux) {
2020-05-12 14:11:58 +03:00
QMAKE_POST_LINK += mkdir -p \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/
2021-08-18 20:14:37 +03:00
for(FILE,EXTRA_FILES) {
2020-05-12 14:11:58 +03:00
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # inside of libs make /include/files
2018-10-30 00:16:07 +03:00
}
2020-05-12 14:11:58 +03:00
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DESTDIR}\"
2018-10-30 00:16:07 +03:00
} else {
2022-06-13 21:18:57 +03:00
EXTRA_FILES ~= s,/,\\,g
BUILD_DIR ~= s,/,\\,g
DEST_DIR = $$DESTDIR/include
DEST_DIR ~= s,/,\\,g
DEST_INCLUDE_DIR ~= s,/,\\,g
2018-10-30 00:16:07 +03:00
2021-08-18 20:14:37 +03:00
for(FILE,EXTRA_FILES) {
2022-06-13 21:18:57 +03:00
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t)
}
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DEST_DIR}\"
2016-03-21 04:12:30 +03:00
}
}
2016-02-17 10:11:00 +03:00
2021-08-18 20:14:37 +03:00
CONFIG(zint) {
message(zint)
2017-09-04 06:44:16 +03:00
INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt
DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt
2021-08-18 20:14:37 +03:00
LIBS += -L$${DEST_LIBS}
CONFIG(release, debug|release) {
LIBS += -lQtZint
} else {
LIBS += -lQtZintd
}
2016-03-21 04:12:30 +03:00
}
2016-02-17 10:11:00 +03:00
#### Install mkspecs, headers and libs to QT_INSTALL_DIR
headerFiles.path = $$[QT_INSTALL_HEADERS]/LimeReport/
headerFiles.files = $${DEST_INCLUDE_DIR}/*
INSTALLS += headerFiles
mkspecs.path = $$[QT_INSTALL_DATA]/mkspecs/features
mkspecs.files = limereport.prf
INSTALLS += mkspecs
target.path = $$[QT_INSTALL_LIBS]
INSTALLS += target
####Automatically build required translation files (*.qm)
2016-03-19 13:48:18 +03:00
2021-08-18 20:14:37 +03:00
CONFIG(build_translations) {
2019-05-29 23:03:22 +03:00
LANGUAGES = ru es ar fr zh pl
2016-02-17 10:11:00 +03:00
2016-03-22 22:58:18 +03:00
defineReplace(prependAll) {
for(a,$$1):result += $$2$${a}$$3
return($$result)
}
2016-03-19 13:48:18 +03:00
2020-05-12 14:11:58 +03:00
TRANSLATIONS = $$prependAll(LANGUAGES, \"$$TRANSLATIONS_PATH/limereport_,.ts\")
2016-03-24 17:10:44 +03:00
2016-03-22 22:58:18 +03:00
qtPrepareTool(LUPDATE, lupdate)
2020-05-12 14:11:58 +03:00
ts.commands = $$LUPDATE \"$$PWD\" -noobsolete -ts $$TRANSLATIONS
2016-03-22 22:58:18 +03:00
TRANSLATIONS_FILES =
qtPrepareTool(LRELEASE, lrelease)
for(tsfile, TRANSLATIONS) {
qmfile = $$tsfile
2020-05-12 14:11:58 +03:00
qmfile ~= s,".ts\"$",".qm\"",
2016-03-22 22:58:18 +03:00
qm.commands += $$LRELEASE -removeidentical $$tsfile -qm $$qmfile $$escape_expand(\\n\\t)
TRANSLATIONS_FILES += $$qmfile
}
qm.depends = ts
2016-03-27 22:02:58 +03:00
OTHER_FILES += $$TRANSLATIONS
2016-03-22 22:58:18 +03:00
QMAKE_EXTRA_TARGETS += qm ts
POST_TARGETDEPS += qm
}
2016-03-19 13:48:18 +03:00
#### EN AUTOMATIC TRANSLATIONS
2022-06-13 21:18:57 +03:00