File: qstardict.pri

package info (click to toggle)
qstardict 1.3-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,784 kB
  • sloc: cpp: 9,590; makefile: 10; sh: 10
file content (134 lines) | stat: -rw-r--r-- 5,816 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#############################################################################
# qstardict.pri - QStarDict, a StarDict clone written with using Qt         #
# Copyright (C) 2008 Alexander Rodin                                        #
#                                                                           #
# This program is free software; you can redistribute it and/or modify      #
# it under the terms of the GNU General Public License as published by      #
# the Free Software Foundation; either version 2 of the License, or         #
# (at your option) any later version.                                       #
#                                                                           #
# This program is distributed in the hope that it will be useful,           #
# but WITHOUT ANY WARRANTY; without even the implied warranty of            #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             #
# GNU General Public License for more details.                              #
#                                                                           #
# You should have received a copy of the GNU General Public License along   #
# with this program; if not, write to the Free Software Foundation, Inc.,   #
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.               #
#############################################################################

# It's common for all subprjects file. Keep it in mind changing it

VERSION = 1.3

QT = \
    core \
    gui \
    network \
    xml

greaterThan(QT_MAJOR_VERSION, 4) {
  QT += widgets printsupport
}

CONFIG += \
    qt \
    warn_on

greaterThan(QT_MAJOR_VERSION, 4) {
        CONFIG += c++11
} else {
        QMAKE_CXXFLAGS += -std=c++11
}

unix {
    CONFIG += link_pkgconfig
    PKGCONFIG += glib-2.0
    macx {
        LIBS += /System/Library/Frameworks/Carbon.framework/Carbon
    } else {
        LIBS += -lX11
    }
    LIBS += -lz
}

win32 {
    CONFIG += console
    LIBS += -lzdll -lglib-2.0 -luser32
    INCLUDEPATH += $$GLIB2PATH/include/glib-2.0 \
                   $$GLIB2PATH/lib/glib-2.0/include \
                   $$ZLIBPATH/include
    QMAKE_LIBDIR += $$GLIB2PATH/lib \
                    $$ZLIBPATH/lib
}

!isEmpty(DEVEL):DEFINES += DEVEL
unix:DEFINES += HAVE_MMAP
unix:isEmpty(NO_DBUS):!contains(QT_CONFIG, dbus): NO_DBUS = 1
unix:isEmpty(NO_DBUS):QT += dbus
unix:isEmpty(NO_DBUS):DEFINES += QSTARDICT_WITH_DBUS
isEmpty(NO_TRANSLATIONS):DEFINES += QSTARDICT_WITH_TRANSLATIONS
include(plugins/plugins.pri)

unix {
    macx {
        isEmpty(INSTALL_PREFIX) {
             INSTALL_PREFIX=/opt
        }
        # helper var to save text duplicity.
        # NOTE: it cannot use $$TARGET because the target is
        # different in every directory. Obviously.
        MAC_BUNDLE_PATH=$$INSTALL_PREFIX/QStarDict.app/Contents
        # bin dir is used for qstardict dir/main application
        # qmake created bundle for it itself. So it *has* to be
        # the same as install location
        BIN_DIR=$$INSTALL_PREFIX
        DATA_DIR=$$MAC_BUNDLE_PATH/share
        TRANSLATIONS_DIR=$$MAC_BUNDLE_PATH/i18n
        PLUGINS_DIR=$$MAC_BUNDLE_PATH/lib
        DOCS_DIR=$$MAC_BUNDLE_PATH/share/doc
        MAN_DIR=$$MAC_BUNDLE_PATH/share/man/man1
    }
    else {
        isEmpty(INSTALL_PREFIX):INSTALL_PREFIX=/usr
        isEmpty(BIN_DIR):BIN_DIR=$$INSTALL_PREFIX/bin
        isEmpty(DATA_DIR):DATA_DIR=$$INSTALL_PREFIX/share/qstardict
        isEmpty(NO_TRANSLATIONS):isEmpty(TRANSLATIONS_DIR):TRANSLATIONS_DIR=$$DATA_DIR/translations
        isEmpty(LIB_DIR):LIB_DIR=$$INSTALL_PREFIX/lib/qstardict
        isEmpty(PLUGINS_DIR):PLUGINS_DIR=$$LIB_DIR/plugins
        isEmpty(DOCS_DIR):DOCS_DIR=$$INSTALL_PREFIX/share/doc/qstardict
        isEmpty(MAN_DIR):MAN_DIR=$$INSTALL_PREFIX/share/man/man1
    }
    DEFINES += QSTARDICT_VERSION=\\\"$$VERSION\\\"
    DEFINES += QSTARDICT_INSTALL_PREFIX=\\\"$$INSTALL_PREFIX\\\"
    DEFINES += QSTARDICT_BIN_DIR=\\\"$$BIN_DIR\\\"
    DEFINES += QSTARDICT_DATA_DIR=\\\"$$DATA_DIR\\\"
    isEmpty(NO_TRANSLATIONS):DEFINES += QSTARDICT_TRANSLATIONS_DIR=\\\"$$TRANSLATIONS_DIR\\\"
    DEFINES += QSTARDICT_PLUGINS_DIR=\\\"$$PLUGINS_DIR\\\"

} else:win32 {
     isEmpty(INSTALL_PREFIX) {
         INSTALL_PREFIX=
     } else {
        # handle path backslashes in defines correctly
         INSTALL_PREFIX = $$re_escape($$INSTALL_PREFIX)
    }
    isEmpty(BIN_DIR):BIN_DIR=$$INSTALL_PREFIX/
    isEmpty(DATA_DIR):DATA_DIR=$$INSTALL_PREFIX/data
    isEmpty(NO_TRANSLATIONS):isEmpty(TRANSLATIONS_DIR):TRANSLATIONS_DIR=$$INSTALL_PREFIX/translations
    isEmpty(PLUGINS_DIR):PLUGINS_DIR=$$INSTALL_PREFIX/plugins
    isEmpty(DOCS_DIR):DOCS_DIR=$$INSTALL_PREFIX/docs
    isEmpty(MAN_DIR):MAN_DIR=$$INSTALL_PREFIX/man

    DEFINES += QSTARDICT_VERSION=\\\"$$VERSION\\\"
#    DEFINES += QSTARDICT_INSTALL_PREFIX=\(QApplication::applicationDirPath\(\)+\\\"$$INSTALL_PREFIX\\\"\)
#    DEFINES += QSTARDICT_BIN_DIR=\(QApplication::applicationDirPath\(\)+\\\"$$BIN_DIR\\\"\)
#    DEFINES += QSTARDICT_DATA_DIR=\(QApplication::applicationDirPath\(\)+\\\"$$DATA_DIR\\\"\)
#    isEmpty(NO_TRANSLATIONS):DEFINES += QSTARDICT_TRANSLATIONS_DIR=\(QApplication::applicationDirPath\(\)+\\\"$$TRANSLATIONS_DIR\\\"\)
#    DEFINES += QSTARDICT_PLUGINS_DIR=\(QApplication::applicationDirPath\(\)+\\\"$$PLUGINS_DIR\\\"\)
    DEFINES += QSTARDICT_INSTALL_PREFIX=\\\"$$INSTALL_PREFIX\\\"
    DEFINES += QSTARDICT_BIN_DIR=\\\"$$BIN_DIR\\\"
    DEFINES += QSTARDICT_DATA_DIR=\\\"$$DATA_DIR\\\"
    isEmpty(NO_TRANSLATIONS):DEFINES += QSTARDICT_TRANSLATIONS_DIR=\\\"$$TRANSLATIONS_DIR\\\"
    DEFINES += QSTARDICT_PLUGINS_DIR=\\\"$$PLUGINS_DIR\\\"
}