common.pri
branchRCL_3
changeset 29 0efa10d348c0
equal deleted inserted replaced
28:053c6c7c14f3 29:0efa10d348c0
       
     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 !symbian: 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 } else {
       
    77     # add platfrom API for windows
       
    78     INCLUDEPATH += \                
       
    79                 $$PWD/homescreensrv_plat/contentstorage_api \
       
    80                 $$PWD/homescreensrv_plat/hswidgetmodel_api \
       
    81                 $$PWD/homescreensrv_plat/homescreen_information_api/inc
       
    82 }
       
    83 
       
    84 plugin: !isEmpty(PLUGIN_SUBDIR): DESTDIR = $$OUTPUT_DIR/$$PLUGIN_SUBDIR
       
    85 
       
    86 !symbian: plugin { # copy manifiers
       
    87     manifest.path = $$DESTDIR
       
    88     manifest.files = ./resource/*.manifest ./resource/*.xml
       
    89     manifest.CONFIG += no_build
       
    90 
       
    91     INSTALLS += manifest
       
    92     PRE_TARGETDEPS += install_manifest
       
    93 
       
    94 }
       
    95 
       
    96 symbian: plugin { # copy qtstub and manifest
       
    97 
       
    98     pluginstub.sources = $${TARGET}.dll
       
    99     pluginstub.path = $$PLUGIN_SUBDIR
       
   100 
       
   101     DEPLOYMENT += pluginstub
       
   102 
       
   103     qtplugins.path = $$PLUGIN_SUBDIR
       
   104     qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
       
   105 
       
   106     contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:$$qtplugins.path/$${TARGET}.xml"
       
   107     
       
   108     for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)"
       
   109 }
       
   110 
       
   111 defineTest(exportResources) {
       
   112 symbian {
       
   113     for(subdirs, 1) {
       
   114         entries = $$files($$subdirs)
       
   115         for(entry, entries) : BLD_INF_RULES.prj_exports += "./$$entry z:/$$replace(2, ^/,)/$$basename(entry)"
       
   116     }
       
   117     export ( BLD_INF_RULES.prj_exports)
       
   118 } else {
       
   119     name = $$replace(1, [/\\\\\.\*], _)
       
   120     eval ($${name}.path = $${OUTPUT_DIR}/$${2})
       
   121     eval ($${name}.files = $$1)
       
   122     eval ($${name}.CONFIG += no_build)
       
   123 
       
   124     INSTALLS += $$name
       
   125     PRE_TARGETDEPS += install_$${name}
       
   126 
       
   127     export ( $${name}.path )
       
   128     export ( $${name}.files )
       
   129     export ( $${name}.CONFIG )
       
   130     export ( INSTALLS )
       
   131     export ( PRE_TARGETDEPS )
       
   132 }
       
   133 }
       
   134 
       
   135 # support for NFT
       
   136 nft:DEFINES += NFT
       
   137 
       
   138 release:DEFINES+=QT_NO_DEBUG_OUTPUT
       
   139 
       
   140 nft:release {
       
   141 DEFINES -=QT_NO_DEBUG_OUTPUT
       
   142 }
       
   143 
       
   144 symbian {
       
   145 SYMBIAN_PLATFORMS = WINSCW ARMV5
       
   146 }