screensaverapp/common.pri
changeset 39 4e8ebe173323
parent 36 cdae8c6c3876
child 42 517f4fb5ec74
child 46 23b5d6a29cce
equal deleted inserted replaced
36:cdae8c6c3876 39:4e8ebe173323
     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: screensaverapp 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/appruntimemodel_api \
       
    77                 $$PWD/../../homescreensrv/homescreensrv_plat/servicemodel_api \
       
    78                 $$PWD/../../homescreensrv/homescreensrv_plat/statemodel_api \
       
    79                 $$PWD/../../homescreensrv/screensavermodel/inc
       
    80 }
       
    81 
       
    82 plugin: !isEmpty(PLUGIN_SUBDIR): DESTDIR = $$OUTPUT_DIR/$$PLUGIN_SUBDIR
       
    83 
       
    84 win32: plugin { # copy manifiers
       
    85     manifest.path = $$DESTDIR
       
    86     manifest.files = ./resource/*.manifest
       
    87     manifest.CONFIG += no_build
       
    88 
       
    89     INSTALLS += manifest
       
    90     PRE_TARGETDEPS += install_manifest
       
    91 }
       
    92 
       
    93 symbian: plugin { # copy qtstub and manifest
       
    94     pluginstub.sources = $${TARGET}.dll
       
    95     pluginstub.path = $$PLUGIN_SUBDIR
       
    96 
       
    97     DEPLOYMENT += pluginstub
       
    98 
       
    99     qtplugins.path = $$PLUGIN_SUBDIR
       
   100     qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
       
   101     qtplugins.sources += resource/$${TARGET}.manifest
       
   102 
       
   103     for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)"
       
   104 }
       
   105 
       
   106 defineTest(exportResources) {
       
   107 symbian {
       
   108     for(subdirs, 1) {
       
   109         entries = $$files($$subdirs)
       
   110         for(entry, entries) : BLD_INF_RULES.prj_exports += "./$$entry z:/$$replace(2, ^/,)/$$basename(entry)"
       
   111     }
       
   112     export ( BLD_INF_RULES.prj_exports)
       
   113 }
       
   114 win32 {
       
   115     name = $$replace(1, [/\\\\\.\*], _)
       
   116     eval ($${name}.path = $${OUTPUT_DIR}/$${2})
       
   117     eval ($${name}.files = $$1)
       
   118     eval ($${name}.CONFIG += no_build)
       
   119 
       
   120     INSTALLS += $$name
       
   121     PRE_TARGETDEPS += install_$${name}
       
   122 
       
   123     export ( $${name}.path )
       
   124     export ( $${name}.files )
       
   125     export ( $${name}.CONFIG )
       
   126     export ( INSTALLS )
       
   127     export ( PRE_TARGETDEPS )
       
   128 }
       
   129 }
       
   130 
       
   131 # support for NFT
       
   132 nft:DEFINES += NFT
       
   133 nft_ram {
       
   134     DEFINES += NFT NFT_RAM
       
   135     LIBS += -lhal
       
   136 }