File: global.pri

package info (click to toggle)
postbooks 4.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 112,660 kB
  • ctags: 22,890
  • sloc: cpp: 310,358; sh: 607; xml: 214; python: 140; awk: 104; makefile: 50
file content (121 lines) | stat: -rw-r--r-- 3,746 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
#
# This file is part of the xTuple ERP: PostBooks Edition, a free and
# open source Enterprise Resource Planning software suite,
# Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.
# It is licensed to you under the Common Public Attribution License
# version 1.0, the full text of which (including xTuple-specific Exhibits)
# is available at www.xtuple.com/CPAL.  By using this software, you agree
# to be bound by its terms.
#

# This file is included by all the other project files and is where
# options or configurations that affect all of the projects can be placed.

OPENRPT_HEADERS = $$(OPENRPT_HEADERS)
! isEmpty( OPENRPT_HEADERS ) {
    OPENRPT_DIR = $$OPENRPT_HEADERS
} else {
    exists(openrpt)    { OPENRPT_DIR = openrpt }
    exists(../openrpt) { OPENRPT_DIR = ../openrpt }
    OPENRPT_DIR_REL=true
}

OPENRPT_BLD = $${OPENRPT_DIR}
exists($${OPENRPT_DIR}-build-desktop) {
  OPENRPT_BLD = $${OPENRPT_DIR}-build-desktop
}

OPENRPT_LIBDIR = $$(OPENRPT_LIBDIR)
isEmpty( OPENRPT_LIBDIR ) {
  OPENRPT_LIBDIR = $${OPENRPT_BLD}/lib
  OPENRPT_LIBDIR_REL=true
}

! exists($${OPENRPT_DIR}) {
  error("Could not set the OPENRPT_DIR qmake variable.")
}

! exists($${OPENRPT_LIBDIR}) {
  error("Could not set the OPENRPT_LIBDIR qmake variable.")
}

CSVIMP_HEADERS = $$(CSVIMP_HEADERS)
isEmpty( CSVIMP_HEADERS ) {
  exists(csvimp)    { CSVIMP_DIR = csvimp    }
  exists(../csvimp) { CSVIMP_DIR = ../csvimp }
  exists(../../csvimp) { CSVIMP_DIR = ../../csvimp }
  CSVIMP_HEADERS = $$CSVIMP_DIR/csvimpcommon
  CSVIMP_HEADERS_REL = true
}

! exists($${CSVIMP_HEADERS}) {
  error("Could not set the CSVIMP_HEADERS qmake variable.")
}

DMTXLIB = -ldmtx

exists($${OPENRPT_LIBDIR}/libdmtx.a)           { DMTXLIB = -ldmtx }
exists($${OPENRPT_LIBDIR}/libDmtx_Library.a)   { DMTXLIB = -lDmtx_Library }
exists($${OPENRPT_LIBDIR}/libdmtx.lib)         { DMTXLIB = -ldmtx }
exists($${OPENRPT_LIBDIR}/libDmtx_Library.lib) { DMTXLIB = -lDmtx_Library }

# global.pri is processed at the top level but the variables are used down 1 level
! isEmpty( OPENRPT_DIR_REL    ) { OPENRPT_DIR    = ../$${OPENRPT_DIR}
                                  OPENRPT_BLD    = ../$${OPENRPT_BLD}    }
! isEmpty( OPENRPT_LIBDIR_REL ) { OPENRPT_LIBDIR = ../$${OPENRPT_LIBDIR} }
! isEmpty( CSVIMP_HEADERS_REL ) { CSVIMP_HEADERS = ../$${CSVIMP_HEADERS} }

INCLUDEPATH += $${OPENRPT_DIR}/common           $${OPENRPT_BLD}/common \
	       $${OPENRPT_DIR}/OpenRPT/renderer $${OPENRPT_BLD}/OpenRPT/renderer \
	       $${OPENRPT_DIR}/OpenRPT/wrtembed $${OPENRPT_BLD}/OpenRPT/wrtembed \
	       $${OPENRPT_DIR}/MetaSQL          $${OPENRPT_BLD}/MetaSQL \
	       $${OPENRPT_DIR}/MetaSQL/tmp      $${OPENRPT_BLD}/MetaSQL/tmp \
	       $${CSVIMP_HEADERS}
INCLUDEPATH =  $$unique(INCLUDEPATH)

XTUPLE_DIR=..
XTUPLE_BLD=$${XTUPLE_DIR}
exists(../qt-client-build-desktop) {
  XTUPLE_BLD=../../qt-client-build-desktop
}

DEPENDPATH  += $${INCLUDEPATH}

CONFIG += release thread

# The packaged version of OpenRPT installs the images to
# /usr/share/openrpt/OpenRPT/images
# Set this variable in the environment to use that location
OPENRPT_IMAGE_DIR = $$(OPENRPT_IMAGE_DIR)
isEmpty( OPENRPT_IMAGE_DIR ) {
  exists("/usr/share/openrpt") {
    OPENRPT_IMAGE_DIR = /usr/share/openrpt/OpenRPT/images
  } else {
    OPENRPT_IMAGE_DIR = $${OPENRPT_DIR}/OpenRPT/images
  }
}

OPENRPTLIBEXT = $${QMAKE_EXTENSION_SHLIB}
XTLIBEXT      = $${QMAKE_EXTENSION_SHLIB}
win32:OPENRPTLIBEXT = a
win32:XTLIBEXT      = a
macx:OPENRPTLIBEXT  = a
macx:XTLIBEXT       = a
isEmpty( OPENRPTLIBEXT ) {
  unix:OPENRPTLIBEXT  = so
}
isEmpty( XTLIBEXT ) {
  unix:XTLIBEXT  = so
}

macx:exists(macx.pri) {
  include(macx.pri)
}

win32:exists(win32.pri) {
  include(win32.pri)
}

unix:exists(unix.pri) {
  include(unix.pri)
}