2024-05-06 08:13:59 +02:00
VERSION = 5.1 .0
2021-06-03 13:47:36 +02:00
isEmpty ( PREFIX ) {
PREFIX = / usr / local
}
2023-08-31 15:25:29 +02:00
isEmpty ( BINDIR ) {
2023-09-18 09:28:31 +02:00
BINDIR = $ $ PREFIX / bin
2023-08-31 15:25:29 +02:00
}
2021-06-03 13:47:36 +02:00
isEmpty ( DESKTOP_DIR ) {
DESKTOP_DIR = $ $ PREFIX / share / applications
}
isEmpty ( DESKTOP_ICON_DIR ) {
DESKTOP_ICON_DIR = $ $ PREFIX / share / icons
}
unix : ! equals ( COMPILE_RESOURCES , "yes" ) : ! android : ! macx {
2021-07-28 19:12:32 +02:00
isEmpty ( TRANSLATIONS_DIR ) {
TRANSLATIONS_DIR = $ $ PREFIX / share / qalculate - qt / translations
2021-06-03 13:47:36 +02:00
}
2021-07-28 19:12:32 +02:00
DEFINES += TRANSLATIONS_DIR =\\\ " $ $ TRANSLATIONS_DIR \\\ "
2021-06-03 13:47:36 +02:00
}
isEmpty ( MAN_DIR ) {
MAN_DIR = $ $ PREFIX / share / man
}
2021-07-28 19:12:32 +02:00
isEmpty ( APPDATA_DIR ) {
APPDATA_DIR = $ $ PREFIX / share / metainfo
}
2021-06-03 13:47:36 +02:00
TEMPLATE = app
TARGET = qalculate - qt
2021-07-10 16:02:53 +02:00
INCLUDEPATH += src
2021-07-17 19:49:25 +02:00
win32 : {
LIBS += - lqalculate - lxml2 - lmpfr - liconv - lintl - lgmp - licuuc - lcurl
2021-07-28 19:12:32 +02:00
CONFIG += c ++ 17
2021-07-17 19:49:25 +02:00
} else {
CONFIG += link_pkgconfig
2021-09-09 10:08:33 +02:00
macx : {
PKGCONFIG += libqalculate gmp mpfr
CONFIG += c ++ 11
} else {
PKGCONFIG += libqalculate
}
2021-07-17 19:49:25 +02:00
}
2021-06-03 13:47:36 +02:00
CONFIG += qt
QT += widgets network
MOC_DIR = build
OBJECTS_DIR = build
2021-11-22 12:00:05 +01:00
HEADERS += src / calendarconversiondialog . h src / csvdialog . h src / dataseteditdialog . h src / datasetsdialog . h src / expressionedit . h src / fpconversiondialog . h src / functioneditdialog . h src / functionsdialog . h src / historyview . h src / itemproxymodel . h src / keypadwidget . h src / matrixwidget . h src / percentagecalculationdialog . h src / periodictabledialog . h src / plotdialog . h src / preferencesdialog . h src / qalculateqtsettings . h src / qalculatewindow . h src / unitsdialog . h src / uniteditdialog . h src / unknowneditdialog . h src / variableeditdialog . h src / variablesdialog . h
2021-06-29 18:35:30 +02:00
2021-11-22 12:00:05 +01:00
SOURCES += src / calendarconversiondialog . cpp src / csvdialog . cpp src / dataseteditdialog . cpp src / datasetsdialog . cpp src / expressionedit . cpp src / fpconversiondialog . cpp src / functioneditdialog . cpp src / functionsdialog . cpp src / historyview . cpp src / itemproxymodel . cpp src / keypadwidget . cpp src / main . cpp src / matrixwidget . cpp src / percentagecalculationdialog . cpp src / periodictabledialog . cpp src / plotdialog . cpp src / preferencesdialog . cpp src / qalculateqtsettings . cpp src / qalculatewindow . cpp src / unitsdialog . cpp src / uniteditdialog . cpp src / unknowneditdialog . cpp src / variableeditdialog . cpp src / variablesdialog . cpp
2021-06-30 19:31:30 +02:00
2021-08-07 15:27:29 +07:00
LANGUAGES = ca de es fr nl pt_BR ru sl sv zh_CN
2023-09-18 09:28:31 +02:00
! win32 {
# parameters : var , prepend , append
defineReplace ( prependAll ) {
for ( a , $ $ 1 ) : result += $ $ 2 $ $ { a } $ $ 3
return ( $ $ result )
}
2021-08-07 15:27:29 +07:00
2023-09-18 09:28:31 +02:00
TRANSLATIONS = translations / qalculate - qt_ca . ts \
translations / qalculate - qt_de . ts \
translations / qalculate - qt_es . ts \
translations / qalculate - qt_fr . ts \
translations / qalculate - qt_nl . ts \
translations / qalculate - qt_pt_BR . ts \
translations / qalculate - qt_ru . ts \
translations / qalculate - qt_sl . ts \
translations / qalculate - qt_sv . ts \
translations / qalculate - qt_zh_CN . ts
2021-10-11 08:15:08 +02:00
2023-09-18 09:28:31 +02:00
TRANSLATIONS = $ $ prependAll ( LANGUAGES , $ $ PWD / translations / qalculate - qt_ , . ts )
TRANSLATIONS_FILES =
qtPrepareTool ( LRELEASE , lrelease ) for ( tsfile , TRANSLATIONS ) {
qmfile = $ $ shadowed ( $ $ tsfile )
qmfile ~= s , . ts$ , . qm ,
qmdir = $ $ dirname ( qmfile )
exists ( $ $ qmdir ) {
mkpath ( $ $ qmdir ) | error ( "Aborting." )
}
command = $ $ LRELEASE - removeidentical $ $ tsfile - qm $ $ qmfile
system ( $ $ command ) | error ( "Failed to run: $$command" )
TRANSLATIONS_FILES += $ $ qmfile
2021-08-07 15:27:29 +07:00
}
}
2021-06-03 13:47:36 +02:00
unix : ! equals ( COMPILE_RESOURCES , "yes" ) : ! android : ! macx {
2023-08-31 15:25:29 +02:00
target . path = $ $ BINDIR
2021-07-28 19:12:32 +02:00
qm . files = translations / qalculate - qt_ca . qm \
translations / qalculate - qt_de . qm \
translations / qalculate - qt_es . qm \
translations / qalculate - qt_fr . qm \
translations / qalculate - qt_nl . qm \
translations / qalculate - qt_pt_BR . qm \
translations / qalculate - qt_ru . qm \
translations / qalculate - qt_sl . qm \
translations / qalculate - qt_sv . qm \
translations / qalculate - qt_zh_CN . qm
2021-06-03 13:47:36 +02:00
2021-07-28 19:12:32 +02:00
qm . path = $ $ TRANSLATIONS_DIR
2022-04-09 09:02:49 -04:00
desktop . files = data / io . github . Qalculate . qalculate - qt . desktop
2021-06-03 13:47:36 +02:00
desktop . path = $ $ DESKTOP_DIR
2022-04-09 09:05:24 -04:00
appdata . files = data / io . github . Qalculate . qalculate - qt . metainfo . xml
2021-07-28 19:12:32 +02:00
appdata . path = $ $ APPDATA_DIR
2021-06-12 19:12:33 +02:00
appicon16 . files = data / 16 / qalculate - qt . png
2021-07-28 19:12:32 +02:00
appicon16 . path = $ $ DESKTOP_ICON_DIR / hicolor / 16 x16 / apps
2021-06-12 19:12:33 +02:00
appicon22 . files = data / 22 / qalculate - qt . png
2021-07-28 19:12:32 +02:00
appicon22 . path = $ $ DESKTOP_ICON_DIR / hicolor / 22 x22 / apps
2021-06-12 19:12:33 +02:00
appicon32 . files = data / 32 / qalculate - qt . png
2021-07-28 19:12:32 +02:00
appicon32 . path = $ $ DESKTOP_ICON_DIR / hicolor / 32 x32 / apps
2021-06-12 19:12:33 +02:00
appicon64 . files = data / 64 / qalculate - qt . png
2021-07-28 19:12:32 +02:00
appicon64 . path = $ $ DESKTOP_ICON_DIR / hicolor / 64 x64 / apps
2021-06-12 19:12:33 +02:00
appicon128 . files = data / 128 / qalculate - qt . png
2021-07-28 19:12:32 +02:00
appicon128 . path = $ $ DESKTOP_ICON_DIR / hicolor / 128 x128 / apps
2021-06-12 19:12:33 +02:00
appiconsvg . files = data / scalable / qalculate - qt . svg
2021-07-28 19:12:32 +02:00
appiconsvg . path = $ $ DESKTOP_ICON_DIR / hicolor / scalable / apps
2021-06-03 13:47:36 +02:00
2021-07-28 19:12:32 +02:00
INSTALLS += target desktop appdata qm \
2021-06-03 13:47:36 +02:00
appicon16 appicon22 appicon32 appicon64 appicon128 appiconsvg
2021-07-28 19:12:32 +02:00
RESOURCES = icons . qrc flags . qrc
2021-06-03 13:47:36 +02:00
} else {
2021-06-30 19:31:30 +02:00
RESOURCES = icons . qrc flags . qrc translations . qrc
2023-08-31 15:25:29 +02:00
target . path = $ $ BINDIR
2022-04-09 09:02:49 -04:00
desktop . files = data / io . github . Qalculate . qalculate - qt . desktop
2021-06-03 13:47:36 +02:00
desktop . path = $ $ DESKTOP_DIR
2021-06-12 19:12:33 +02:00
appicon64 . files = data / 64 / qalculate - qt . png
2021-06-03 13:47:36 +02:00
appicon64 . path = $ $ DESKTOP_ICON_DIR / hicolor / 64 x64 / apps
INSTALLS += target desktop appicon64
}
2021-07-28 19:12:32 +02:00
unix : ! android : ! macx {
man . files = data / qalculate - qt .1
man . path = $ $ MAN_DIR / man1
INSTALLS += man
}
2023-09-24 00:01:32 -04:00
macx : ICON = data / qalculate . icns
2021-06-03 13:47:36 +02:00
win32 : RC_FILE = winicon . rc