Bump to 4.6.7
[qBittorrent.git] / macxconf.pri
blob43f02ba8b96b9e02d6334a49b58a8bc4e5040b70
1 # The first path is used when the source is being build by packagers (pbuilder/sbuild/etc)
2 # The second path is used when you manually run the configure script in the root folder (eg when using qt creator)
3 exists($$OUT_PWD/../conf.pri) {
4     include($$OUT_PWD/../conf.pri)
6 else {
7     include(conf.pri)
10 # Custom function
11 # Return Qt translations files as list of paths
12 # It will return .qm files of qt/qtbase that aren't stub files.
13 defineReplace(qbt_get_qt_translations) {
14     # The $$[] syntax queries qmake properties
15     TMP_TRANSLATIONS = $$files($$[QT_INSTALL_TRANSLATIONS]/qt_??.qm)
16     TMP_TRANSLATIONS += $$files($$[QT_INSTALL_TRANSLATIONS]/qt_??_??.qm)
17     TMP_TRANSLATIONS += $$files($$[QT_INSTALL_TRANSLATIONS]/qtbase_??.qm)
18     TMP_TRANSLATIONS += $$files($$[QT_INSTALL_TRANSLATIONS]/qtbase_??_??.qm)
20    # Consider files less than 10KB as stub translations
21    for (TRANSLATION, TMP_TRANSLATIONS) {
22       TRANSLATION_SIZE = $$system("stat -f%z $${TRANSLATION}", true, EXIT_STATUS)
23       equals(EXIT_STATUS, 0):!lessThan(TRANSLATION_SIZE, 10240): FINAL_TRANSLATIONS += $${TRANSLATION}
24    }
26    return($$FINAL_TRANSLATIONS)
29 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15
31 DEFINES += _DARWIN_FEATURE_64_BIT_INODE
33 LIBS += -framework Carbon -framework IOKit -framework AppKit
35 DIST_PATH = ../dist/mac
37 document_icon.path = Contents/Resources
38 document_icon.files = $$DIST_PATH/qBitTorrentDocument.icns
39 QMAKE_BUNDLE_DATA += document_icon
41 qt_conf.path = Contents/Resources
42 qt_conf.files = $$DIST_PATH/qt.conf
43 QMAKE_BUNDLE_DATA += qt_conf
45 qt_translations.path = Contents/translations
46 qt_translations.files =  $$qbt_get_qt_translations()
47 QMAKE_BUNDLE_DATA += qt_translations
49 ICON = $$DIST_PATH/qbittorrent_mac.icns
50 QMAKE_INFO_PLIST = $$DIST_PATH/Info.plist