~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to qa/oldtest/unittest.pri

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# helpers to reduce the size of unittest projects
 
2
unittest {
 
3
        TEMPLATE = app
 
4
 
 
5
        CONFIG += qtestlib console debug qt
 
6
        CONFIG -= app_bundle
 
7
}
 
8
 
 
9
windows {
 
10
        # otherwise we would get 'unresolved external _WinMainCRTStartup'
 
11
        # when compiling with MSVC
 
12
        MOC_DIR     = _moc
 
13
        OBJECTS_DIR = _obj
 
14
        UI_DIR      = _ui
 
15
        RCC_DIR     = _rcc
 
16
}
 
17
!windows {
 
18
        MOC_DIR     = .moc
 
19
        OBJECTS_DIR = .obj
 
20
        UI_DIR      = .ui
 
21
        RCC_DIR     = .rcc
 
22
}
 
23
 
 
24
mac:app_bundle {
 
25
        EXEC_TARGET = $${TARGET}.app/Contents/MacOS/$${TARGET}
 
26
}
 
27
else {
 
28
        EXEC_TARGET = $$TARGET
 
29
}
 
30
 
 
31
# run target (TODO: Make it work on Windows too)
 
32
QMAKE_EXTRA_TARGETS += run
 
33
run.depends = $$EXEC_TARGET
 
34
run.commands = PSIDATADIR=~/.psi-test ./$$EXEC_TARGET
 
35
 
 
36
unix {
 
37
        # gdb target
 
38
        QMAKE_EXTRA_TARGETS += gdb
 
39
        gdb.depends = $$EXEC_TARGET
 
40
        mac {
 
41
                QT_FRAMEWORK_VERSION = 4
 
42
                QT_FRAMEWORKS = QtCore QtXml QtNetwork QtGui QtSql Qt3Support
 
43
                FRAMEWORK = \$(QTDIR)/lib/\$\${f}.framework/Versions/$$QT_FRAMEWORK_VERSION/\$\${f}
 
44
                gdb.commands += \
 
45
                        for f in $$QT_FRAMEWORKS; do \
 
46
                                install_name_tool -id "$$FRAMEWORK" "$$FRAMEWORK""_debug"; \
 
47
                                install_name_tool -change "$$FRAMEWORK" "$$FRAMEWORK""_debug" "./$$EXEC_TARGET"; \
 
48
                        done;
 
49
        }
 
50
        gdb.commands += PSIDATADIR=~/.psi-test gdb ./$$EXEC_TARGET
 
51
        mac {
 
52
                gdb.commands += ; \
 
53
                        for f in $$QT_FRAMEWORKS; do \
 
54
                                install_name_tool -id "$$FRAMEWORK""_debug" "$$FRAMEWORK""_debug"; \
 
55
                                install_name_tool -change "$$FRAMEWORK""_debug" "$$FRAMEWORK" "./$$EXEC_TARGET"; \
 
56
                        done;
 
57
        }
 
58
}
 
59
 
 
60
mac {
 
61
        # xcode target
 
62
        QMAKE_EXTRA_TARGETS += xcode
 
63
        xcode.depends = Makefile
 
64
        xcode.commands = ${QMAKE} -spec macx-xcode -o $$TARGET
 
65
}