summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/qttest_p4.prf77
1 files changed, 2 insertions, 75 deletions
diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf
index 3e1c918..e9d79b0 100644
--- a/mkspecs/features/qttest_p4.prf
+++ b/mkspecs/features/qttest_p4.prf
@@ -1,80 +1,7 @@
isEmpty(TEMPLATE):TEMPLATE=app
-CONFIG += qt warn_on console depend_includepath
+CONFIG += qt warn_on console depend_includepath
-wince*:{
-LIBS += corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
-CONFIG(debug, debug|release) {
- LIBS += $$[QT_INSTALL_LIBS]/qtmaind.lib
-} else {
- LIBS += $$[QT_INSTALL_LIBS]/qtmain.lib
-}
-}
-
-# find testlib's prl file and extract the librarie's name
-QTEST_LIB =
-mac:exists($$[QT_INSTALL_LIBS]/QtTest.framework):QTEST_LIB = QtTest.framework
-CONFIG(debug, debug|release) {
- isEmpty(QTEST_LIB) {
- win32 {
- QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/QtTest$${QT_LIBINFIX}d.prl, QMAKE_PRL_TARGET)4.dll
- }
- mac {
- QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/libQtTest$${QT_LIBINFIX}_debug.prl, QMAKE_PRL_TARGET)
- }
- unix:!mac {
- QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/libQtTest$${QT_LIBINFIX}.prl, QMAKE_PRL_TARGET)
- }
- }
- OBJECTS_DIR = tmp/debug
- MOC_DIR = tmp/debug
-} else {
- isEmpty(QTEST_LIB) {
- win32 {
- QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/QtTest$${QT_LIBINFIX}.prl, QMAKE_PRL_TARGET)4.dll
- } else {
- QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/libQtTest$${QT_LIBINFIX}.prl, QMAKE_PRL_TARGET)
- }
- }
- OBJECTS_DIR = tmp/release
- MOC_DIR = tmp/release
-}
-isEmpty(QTEST_LIB) {
- warning("Cannot find testlib's prl file, run qmake in $QTDIR/src/testlib")
- CONFIG += embed_testlib
-} else {
- !exists($$[QT_INSTALL_LIBS]/$$QTEST_LIB):CONFIG += embed_testlib
-}
-
-# make sure the test is build according to your Qt configuration
-contains(QT_CONFIG, embedded):CONFIG += embedded
-
-embed_testlib {
- QTESTDIR = $${QT_SOURCE_TREE}
- isEmpty(QTESTDIR):QTESTDIR = $$(QTSRCDIR)
- isEmpty(QTESTDIR):QTESTDIR = $$(QTDIR)
- isEmpty(QTESTDIR):warning("Cannot find QTestLib sources, set QTDIR or QTSRCDIR")
- QTESTDIR = $${QTESTDIR}/src/testlib
- HEADERS += $${QTESTDIR}/qtesteventloop.h
- SOURCES += $${QTESTDIR}/qasciikey.cpp \
- $${QTESTDIR}/qabstracttestlogger.cpp \
- $${QTESTDIR}/qsignaldumper.cpp \
- $${QTESTDIR}/qtestdata.cpp \
- $${QTESTDIR}/qtestresult.cpp \
- $${QTESTDIR}/qxmltestlogger.cpp \
- $${QTESTDIR}/qplaintestlogger.cpp \
- $${QTESTDIR}/qtestcase.cpp \
- $${QTESTDIR}/qbenchmark.cpp \
- $${QTESTDIR}/qbenchmarkevent.cpp \
- $${QTESTDIR}/qbenchmarkmeasurement.cpp \
- $${QTESTDIR}/qbenchmarkvalgrind.cpp \
- $${QTESTDIR}/qtestlog.cpp \
- $${QTESTDIR}/qtesttable.cpp
- DEFINES += QTEST_EMBED QTEST_LIGHT
-} else {
- CONFIG += qtestlib
-}
-
-embedded:QMAKE_CXXFLAGS+=-fno-rtti
+qtAddLibrary(QtTest)
# prefix test binary with tst_
!contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_")