homescreenapp/common.pri
changeset 35 f9ce957a272c
child 36 cdae8c6c3876
equal deleted inserted replaced
5:c743ef5928ba 35:f9ce957a272c
       
     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: homescreenapp project - common QMake settings
       
    15 #
       
    16 
       
    17 CONFIG += debug_and_release
       
    18 
       
    19 # On win32 and mac, debug and release libraries are named differently.
       
    20 # We must follow the debug and release settings Qt was compiled with:
       
    21 # build debug iff Qt built debug, build release iff Qt built release.
       
    22 win32|mac {
       
    23     !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
       
    24         CONFIG -= debug_and_release debug release
       
    25         contains(QT_CONFIG,debug):  CONFIG+=debug
       
    26         contains(QT_CONFIG,release):CONFIG+=release
       
    27     }
       
    28 }
       
    29 
       
    30 CONFIG(debug, debug|release) {
       
    31     SUBDIRPART = debug
       
    32 } else {
       
    33     SUBDIRPART = release
       
    34 }
       
    35 
       
    36 win32: OUTPUT_DIR = $$PWD/../../bin/$$SUBDIRPART
       
    37 symbian: OUTPUT_DIR = $$PWD/bin
       
    38 
       
    39 SOURCE_DIR = $$PWD/inc
       
    40 
       
    41 #test whether we have a unit test
       
    42 !testcase {
       
    43     OBJECTS_DIR = $$OUTPUT_DIR/tmp/$$TARGET
       
    44     DESTDIR = $$OUTPUT_DIR
       
    45     MOC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/moc
       
    46     RCC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/rcc
       
    47     UI_DIR = $$OUTPUT_DIR/tmp/$$TARGET/ui
       
    48 } else { # test part is NOT DONE
       
    49     QT *= testlib
       
    50     CONFIG += console
       
    51     CONFIG -= app_bundle
       
    52     OBJECTS_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET
       
    53     DESTDIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART
       
    54     MOC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/moc
       
    55     RCC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/rcc
       
    56     UI_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/ui
       
    57     LIBS += -L$$OUTPUT_DIR/bin/$$SUBDIRPART/bin  #link against library that we test
       
    58 }
       
    59 
       
    60 # Add the output dirs to the link path too
       
    61 LIBS += -L$$DESTDIR
       
    62 
       
    63 DEPENDPATH += . $$SOURCE_DIR
       
    64 INCLUDEPATH += . $$SOURCE_DIR
       
    65 #For some reason the default include path doesn't include MOC_DIR on symbian
       
    66 symbian {
       
    67     INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
       
    68     INCLUDEPATH += $$MOC_DIR
       
    69     TARGET.CAPABILITY = ALL -TCB
       
    70     TARGET.EPOCALLOWDLLDATA=1
       
    71 }
       
    72 
       
    73 win32 {
       
    74     # add platfrom API for windows
       
    75     INCLUDEPATH += \                
       
    76                 $$PWD/../../homescreensrv/homescreensrv_plat/contentstorage_api \
       
    77                 $$PWD/../../homescreensrv/homescreensrv_plat/hswidgetmodel_api \               
       
    78                 $$PWD/../../homescreensrv/homescreensrv_plat/homescreen_information_api/inc
       
    79 }
       
    80 
       
    81 plugin: !isEmpty(PLUGIN_SUBDIR): DESTDIR = $$OUTPUT_DIR/$$PLUGIN_SUBDIR
       
    82 
       
    83 win32: plugin { # copy manifiers
       
    84     manifest.path = $$DESTDIR
       
    85     manifest.files = ./resource/*.manifest ./resource/*.xml
       
    86     manifest.CONFIG += no_build
       
    87 
       
    88     INSTALLS += manifest
       
    89     PRE_TARGETDEPS += install_manifest
       
    90 
       
    91 }
       
    92 
       
    93 symbian: plugin { # copy qtstub and manifest
       
    94 
       
    95     pluginstub.sources = $${TARGET}.dll
       
    96     pluginstub.path = $$PLUGIN_SUBDIR
       
    97 
       
    98     DEPLOYMENT += pluginstub
       
    99 
       
   100     qtplugins.path = $$PLUGIN_SUBDIR
       
   101     qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
       
   102 
       
   103     message(Remove "contains(MOBILITY, serviceframework)" after the QtSF refactorig is done!)
       
   104         
       
   105     !contains(MOBILITY, serviceframework):qtplugins.sources += resource/$${TARGET}.manifest
       
   106     contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.s60xml 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 }
       
   119 win32 {
       
   120     name = $$replace(1, [/\\\\\.\*], _)
       
   121     eval ($${name}.path = $${OUTPUT_DIR}/$${2})
       
   122     eval ($${name}.files = $$1)
       
   123     eval ($${name}.CONFIG += no_build)
       
   124 
       
   125     INSTALLS += $$name
       
   126     PRE_TARGETDEPS += install_$${name}
       
   127 
       
   128     export ( $${name}.path )
       
   129     export ( $${name}.files )
       
   130     export ( $${name}.CONFIG )
       
   131     export ( INSTALLS )
       
   132     export ( PRE_TARGETDEPS )
       
   133 }
       
   134 }
       
   135 
       
   136 !exists($${EPOCROOT}epoc32/include/mw/XQSettingsManager) {
       
   137 	DEFINES += NO_QT_EXTENSIONS
       
   138 }
       
   139 
       
   140 # support for NFT
       
   141 nft:DEFINES += NFT
       
   142 
       
   143 release:DEFINES+=QT_NO_DEBUG_OUTPUT
       
   144 
       
   145 nft:release {
       
   146 DEFINES -=QT_NO_DEBUG_OUTPUT
       
   147 }
       
   148 
       
   149 symbian {
       
   150 SYMBIAN_PLATFORMS = WINSCW ARMV5
       
   151 # ONLY FOR DEVELOPMENT! REMOVE THIS BEFORE EACH HS_Domain RELEASE!
       
   152 MMP_RULES += EXPORTUNFROZEN
       
   153 }