common.pri
changeset 60 f62f87b200ec
child 61 8e5041d13c84
equal deleted inserted replaced
4:1a2a00e78665 60:f62f87b200ec
       
     1 #
       
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 #
       
    16 ######################################################################
       
    17 #
       
    18 # homescreensrv project - common QMake settings
       
    19 #
       
    20 ######################################################################
       
    21 
       
    22 CONFIG += debug_and_release
       
    23 
       
    24 # On win32 and mac, debug and release libraries are named differently.
       
    25 # We must follow the debug and release settings Qt was compiled with:
       
    26 # build debug iff Qt built debug, build release iff Qt built release.
       
    27 win32|mac {
       
    28     !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
       
    29         CONFIG -= debug_and_release debug release
       
    30         contains(QT_CONFIG,debug):  CONFIG+=debug
       
    31         contains(QT_CONFIG,release):CONFIG+=release
       
    32     }
       
    33 }
       
    34 
       
    35 CONFIG(debug, debug|release) {
       
    36     SUBDIRPART = debug
       
    37 } else {
       
    38     SUBDIRPART = release
       
    39 }
       
    40 
       
    41 win32: OUTPUT_DIR = $$PWD/../bin/$$SUBDIRPART
       
    42 symbian: OUTPUT_DIR = $$PWD/bin
       
    43 
       
    44 SOURCE_DIR = $$PWD/inc
       
    45 
       
    46 #test whether we have a unit test
       
    47 !testcase {
       
    48     OBJECTS_DIR = $$OUTPUT_DIR/tmp/$$TARGET
       
    49     DESTDIR = $$OUTPUT_DIR
       
    50     MOC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/moc
       
    51     RCC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/rcc
       
    52     UI_DIR = $$OUTPUT_DIR/tmp/$$TARGET/ui
       
    53 } else { # test part is NOT DONE
       
    54     QT *= testlib
       
    55     CONFIG += console
       
    56     CONFIG -= app_bundle
       
    57     OBJECTS_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET
       
    58     DESTDIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART
       
    59     MOC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/moc
       
    60     RCC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/rcc
       
    61     UI_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/ui
       
    62     LIBS += -L$$OUTPUT_DIR/bin/$$SUBDIRPART/bin  #link against library that we test
       
    63 }
       
    64 
       
    65 # Add the output dirs to the link path too
       
    66 LIBS += -L$$DESTDIR
       
    67 
       
    68 DEPENDPATH += . $$SOURCE_DIR
       
    69 INCLUDEPATH += . $$SOURCE_DIR
       
    70 #For some reason the default include path doesn't include MOC_DIR on symbian
       
    71 symbian {
       
    72     INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
       
    73     INCLUDEPATH += $$MOC_DIR
       
    74     TARGET.CAPABILITY = ALL -TCB
       
    75     TARGET.EPOCALLOWDLLDATA=1
       
    76 }
       
    77 
       
    78 win32 {
       
    79     # add platfrom API for windows
       
    80     INCLUDEPATH += \
       
    81                 $$PWD/homescreensrv_plat/appruntimemodel_api \
       
    82                 $$PWD/homescreensrv_plat/contentstorage_api \
       
    83                 $$PWD/homescreensrv_plat/hswidgetmodel_api \
       
    84                 $$PWD/homescreensrv_plat/servicemodel_api \
       
    85                 $$PWD/homescreensrv_plat/statemodel_api \
       
    86                 $$PWD/homescreensrv_plat/homescreen_information_api/inc
       
    87 }
       
    88 
       
    89 defineTest(exportResources) {
       
    90 symbian {
       
    91     for(subdirs, 1) {
       
    92         entries = $$files($$subdirs)
       
    93         for(entry, entries) : BLD_INF_RULES.prj_exports += "./$$entry z:/$$replace(2, ^/,)/$$basename(entry)"
       
    94     }
       
    95     export ( BLD_INF_RULES.prj_exports)
       
    96 }
       
    97 win32 {
       
    98     name = $$replace(1, [/\\\\\.\*], _)
       
    99     eval ($${name}.path = $${OUTPUT_DIR}/$${2})
       
   100     eval ($${name}.files = $$1)
       
   101     eval ($${name}.CONFIG += no_build)
       
   102 
       
   103     INSTALLS += $$name
       
   104     PRE_TARGETDEPS += install_$${name}
       
   105 
       
   106     export ( $${name}.path )
       
   107     export ( $${name}.files )
       
   108     export ( $${name}.CONFIG )
       
   109     export ( INSTALLS )
       
   110     export ( PRE_TARGETDEPS )
       
   111 }
       
   112 }
       
   113 
       
   114 # support for NFT
       
   115 nft:DEFINES += NFT
       
   116 
       
   117 release:DEFINES+=QT_NO_DEBUG_OUTPUT
       
   118 
       
   119 nft:release {
       
   120 DEFINES -=QT_NO_DEBUG_OUTPUT
       
   121 }
       
   122 
       
   123 symbian {
       
   124 SYMBIAN_PLATFORMS = WINSCW ARMV5
       
   125 # ONLY FOR DEVELOPMENT! REMOVE THIS BEFORE EACH HS_Domain RELEASE!
       
   126 MMP_RULES += EXPORTUNFROZEN
       
   127 }