first commit: set up basic project structure, created simple qt+qml application
[quickdice] / common-installs-config.pri
1 ###############################################################################
2 #
3 # This file is part of quickdice.
4 #
5 # Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
6 # Contact: Zoltan Papp <zoltan.papp@digia.com>
7 #
8 # This library is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU Lesser General Public License version 2.1 as
10 # published by the Free Software Foundation.
11 #
12 # This library is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 # License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with this library; if not, write to the Free Software Foundation, Inc.,
19 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #
21 ###############################################################################
22
23 #------------------------------------------------------------------------------
24 # Common installation configuration for all projects.
25 #------------------------------------------------------------------------------
26
27 #------------------------------------------------------------------------------
28 # setup the installation prefix
29 #------------------------------------------------------------------------------
30 !include( common-vars.pri ) : \
31     error( "Unable to include common-vars.pri" )
32
33 INSTALL_PREFIX = /usr  # default installation prefix
34
35 # default prefix can be overriden by defining PREFIX when running qmake
36 isEmpty( PREFIX ) {
37
38     message("====")
39     message("==== NOTE: To override the installation path run: `qmake PREFIX=/custom/path'")
40     message("==== (current installation path is `$${INSTALL_PREFIX}')")
41 } else {
42
43     INSTALL_PREFIX = $${PREFIX}
44     message("====")
45     message("==== install prefix set to `$${INSTALL_PREFIX}'")
46 }
47
48 #------------------------------------------------------------------------------
49 # default installation target for applications
50 #------------------------------------------------------------------------------
51 contains( TEMPLATE, app ) {
52
53     target.path  = $${INSTALL_PREFIX}/bin
54     INSTALLS    += target
55     message("====")
56     message("==== INSTALLS += target")
57 }
58
59 #------------------------------------------------------------------------------
60 # default installation target for libraries
61 #------------------------------------------------------------------------------
62 contains( TEMPLATE, lib ) {
63
64     target.path  = $${INSTALL_PREFIX}/lib
65     INSTALLS    += target
66     message("====")
67     message("==== INSTALLS += target")
68 }
69
70 #-----------------------------------------------------------------------------
71 # target for header files
72 #-----------------------------------------------------------------------------
73 !isEmpty( headers.files ) {
74
75     headers.path  = $${INSTALL_PREFIX}/include/$${PROJECT_FULL_NAME}
76     INSTALLS     += headers
77     message("====")
78     message("==== INSTALLS += headers")
79 } else {
80
81     message("====")
82     message("==== NOTE: Remember to add your API headers into `headers.files' for installation!")
83 }
84
85 #------------------------------------------------------------------------------
86 # End of File
87 #------------------------------------------------------------------------------
88