screensaver/common.pri
changeset 62 341166945d65
child 76 3916af29624a
equal deleted inserted replaced
57:2e2dc3d30ca8 62:341166945d65
       
     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     DEFINES += QT_NO_DEBUG_OUTPUT
       
    35 }
       
    36 
       
    37 win32: OUTPUT_DIR = $$PWD/../../bin/$$SUBDIRPART
       
    38 symbian: OUTPUT_DIR = $$PWD/bin
       
    39 
       
    40 SOURCE_DIR = $$PWD/inc
       
    41 
       
    42 #test whether we have a unit test
       
    43 !testcase {
       
    44     OBJECTS_DIR = $$OUTPUT_DIR/tmp/$$TARGET
       
    45     DESTDIR = $$OUTPUT_DIR
       
    46     MOC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/moc
       
    47     RCC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/rcc
       
    48     UI_DIR = $$OUTPUT_DIR/tmp/$$TARGET/ui
       
    49 } else { # test part is NOT DONE
       
    50     QT *= testlib
       
    51     CONFIG += console
       
    52     CONFIG -= app_bundle
       
    53     OBJECTS_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET
       
    54     DESTDIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART
       
    55     MOC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/moc
       
    56     RCC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/rcc
       
    57     UI_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/ui
       
    58     LIBS += -L$$OUTPUT_DIR/bin/$$SUBDIRPART/bin  #link against library that we test
       
    59 }
       
    60 
       
    61 # Add the output dirs to the link path too
       
    62 LIBS += -L$$DESTDIR
       
    63 
       
    64 DEPENDPATH += . $$SOURCE_DIR
       
    65 INCLUDEPATH += . $$SOURCE_DIR
       
    66 #For some reason the default include path doesn't include MOC_DIR on symbian
       
    67 symbian {
       
    68     INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
       
    69     INCLUDEPATH += $$MOC_DIR
       
    70     TARGET.CAPABILITY = ALL -TCB
       
    71     TARGET.EPOCALLOWDLLDATA=1
       
    72     SYMBIAN_PLATFORMS = WINSCW ARMV5
       
    73 }
       
    74 
       
    75 win32 {
       
    76     # add platfrom API for windows
       
    77     INCLUDEPATH += $$PWD/screensavermodel/inc
       
    78 }
       
    79 
       
    80 plugin {
       
    81     !isEmpty(PLUGIN_SUBDIR): DESTDIR = $$OUTPUT_DIR/$$PLUGIN_SUBDIR
       
    82     win32: exists($$_PRO_FILE_PWD_/resource/$${TARGET}.xml) { # copy manifiests
       
    83         manifest.path = $$DESTDIR
       
    84         manifest.files = ./resource/$${TARGET}.xml
       
    85         manifest.CONFIG += no_build
       
    86 
       
    87         INSTALLS += manifest
       
    88         PRE_TARGETDEPS += install_manifest
       
    89     }
       
    90     symbian { # copy qtstub and manifest
       
    91         pluginstub.sources = $${TARGET}.dll
       
    92         pluginstub.path = $$PLUGIN_SUBDIR
       
    93 
       
    94         DEPLOYMENT += pluginstub
       
    95 
       
    96         qtplugins.path = $$PLUGIN_SUBDIR
       
    97         qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
       
    98 
       
    99         exists($$_PRO_FILE_PWD_/resource/$${TARGET}.s60xml) {
       
   100             BLD_INF_RULES.prj_exports += "resource/$${TARGET}.s60xml z:$$qtplugins.path/$${TARGET}.xml"
       
   101         }
       
   102 
       
   103         for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)"
       
   104     }
       
   105 }
       
   106 
       
   107 defineTest(exportResources) {
       
   108 symbian {
       
   109     for(subdirs, 1) {
       
   110         entries = $$files($$subdirs)
       
   111         for(entry, entries) : BLD_INF_RULES.prj_exports += "./$$entry z:/$$replace(2, ^/,)/$$basename(entry)"
       
   112     }
       
   113     export ( BLD_INF_RULES.prj_exports)
       
   114 }
       
   115 win32 {
       
   116     name = $$replace(1, [/\\\\\.\*], _)
       
   117     eval ($${name}.path = $${OUTPUT_DIR}/$${2})
       
   118     eval ($${name}.files = $$1)
       
   119     eval ($${name}.CONFIG += no_build)
       
   120 
       
   121     INSTALLS += $$name
       
   122     PRE_TARGETDEPS += install_$${name}
       
   123 
       
   124     export ( $${name}.path )
       
   125     export ( $${name}.files )
       
   126     export ( $${name}.CONFIG )
       
   127     export ( INSTALLS )
       
   128     export ( PRE_TARGETDEPS )
       
   129 }
       
   130 }
       
   131 
       
   132 !exists($${EPOCROOT}epoc32/include/mw/XQSettingsManager) {
       
   133     DEFINES += NO_QT_EXTENSIONS
       
   134 }
       
   135 
       
   136 # support for NFT
       
   137 nft:DEFINES += NFT
       
   138 symbian {
       
   139     nft_ram {
       
   140         DEFINES += NFT NFT_RAM
       
   141         LIBS += -lhal
       
   142     }
       
   143 }
       
   144 
       
   145 symbian {
       
   146     # fix to compile on QT4.7
       
   147     defFilePath = ./..
       
   148 }
       
   149