1
by Alberto Mardegan
Initial implementation |
1 |
#----------------------------------------------------------------------------- |
2 |
# Common installation configuration for all projects. |
|
3 |
#----------------------------------------------------------------------------- |
|
4 |
||
5 |
||
6 |
#----------------------------------------------------------------------------- |
|
7 |
# setup the installation prefix |
|
8 |
#----------------------------------------------------------------------------- |
|
9 |
INSTALL_PREFIX = /usr # default installation prefix |
|
10 |
||
11 |
# default prefix can be overriden by defining PREFIX when running qmake |
|
12 |
isEmpty( PREFIX ) { |
|
13 |
message("====") |
|
14 |
message("==== NOTE: To override the installation path run: `qmake PREFIX=/custom/path'") |
|
15 |
message("==== (current installation path is `$${INSTALL_PREFIX}')") |
|
16 |
} else { |
|
17 |
INSTALL_PREFIX = $${PREFIX} |
|
18 |
message("====") |
|
19 |
message("==== install prefix set to `$${INSTALL_PREFIX}'") |
|
20 |
} |
|
21 |
||
22 |
||
23 |
#----------------------------------------------------------------------------- |
|
24 |
# default installation target for applications |
|
25 |
#----------------------------------------------------------------------------- |
|
26 |
contains( TEMPLATE, app ) { |
|
27 |
target.path = $${INSTALL_PREFIX}/bin |
|
28 |
INSTALLS += target |
|
29 |
message("====") |
|
30 |
message("==== INSTALLS += target") |
|
31 |
} |
|
32 |
||
33 |
||
34 |
#----------------------------------------------------------------------------- |
|
35 |
# default installation target for libraries |
|
36 |
#----------------------------------------------------------------------------- |
|
37 |
contains( TEMPLATE, lib ) { |
|
38 |
||
39 |
target.path = $${INSTALL_PREFIX}/lib |
|
40 |
INSTALLS += target |
|
41 |
message("====") |
|
42 |
message("==== INSTALLS += target") |
|
43 |
||
44 |
# reset the .pc file's `prefix' variable |
|
45 |
#include( tools/fix-pc-prefix.pri ) |
|
46 |
||
47 |
} |
|
48 |
||
49 |
#----------------------------------------------------------------------------- |
|
50 |
# target for header files |
|
51 |
#----------------------------------------------------------------------------- |
|
52 |
!isEmpty( headers.files ) { |
|
53 |
headers.path = $${INSTALL_PREFIX}/include/$${TARGET} |
|
54 |
INSTALLS += headers |
|
55 |
message("====") |
|
56 |
message("==== INSTALLS += headers") |
|
57 |
} else { |
|
58 |
message("====") |
|
59 |
message("==== NOTE: Remember to add your API headers into `headers.files' for installation!") |
|
60 |
} |
|
61 |
||
62 |
||
63 |
# End of File |