Sync spec with MeeGo upstream and fix some issues
[accounts-sso:jlaako-accounts-qt.git] / common-installs-config.pri
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 # default installation target for libraries
35 #-----------------------------------------------------------------------------
36 contains( TEMPLATE, lib ) {
37
38     if exists( /etc/meego-release ) {
39         ARCH = $$system(tail -n1 /etc/meego-release)
40     } else {
41         ARCH = $$system(uname -m)
42     }
43     contains( ARCH, x86_64 ) {
44         target.path  = $${INSTALL_PREFIX}/lib64
45     } else {
46         target.path  = $${INSTALL_PREFIX}/lib
47     }
48     INSTALLS    += target
49     message("====")
50     message("==== INSTALLS += target")
51
52     # reset the .pc file's `prefix' variable
53     #include( tools/fix-pc-prefix.pri )
54
55 }
56
57 #-----------------------------------------------------------------------------
58 # target for header files
59 #-----------------------------------------------------------------------------
60 !isEmpty( headers.files ) {
61     headers.path  = $${INSTALL_PREFIX}/include/$${TARGET}/Accounts/
62     INSTALLS     += headers
63     message("====")
64     message("==== INSTALLS += headers")
65 } else {
66     message("====")
67     message("==== NOTE: Remember to add your API headers into `headers.files' for installation!")
68 }
69
70
71 # End of File