From: Rusty Lynch Date: Wed, 4 Apr 2012 18:20:25 +0000 (-0700) Subject: Revamping the build such that passing in VERBOSE in the CONFIG will X-Git-Tag: 061412173448~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7afa8fffec585cb639d53f4025b5dec8d47868d5;p=profile%2Fivi%2Fhfdialer.git Revamping the build such that passing in VERBOSE in the CONFIG will trigger trace operations and various extra verbose error messages directly to the console, and also setting the default build (without passing wayland or xlib to the CONFIG) will result in using the normal qt config paths. To build with verbose mode on, run 'qmake CONFIG+=verbose' --- diff --git a/common.pri b/common.pri index e7f4f13..f7d3012 100644 --- a/common.pri +++ b/common.pri @@ -1,8 +1,6 @@ VERSION = 0.2.5 TARGET = dialer -CONFIG += link_pkgconfig network opengl debug - -# DEFINES += WANT_DEBUG +CONFIG += link_pkgconfig network opengl # Build configuration diff --git a/projects.pro b/projects.pro index cef2ba8..a0220fa 100644 --- a/projects.pro +++ b/projects.pro @@ -1,6 +1,6 @@ include (common.pri) TEMPLATE = subdirs -CONFIG += ordered debug +CONFIG += ordered SUBDIRS = src qml dialerassets sounds #OTHER_FILES += dialer.service diff --git a/src/common.h b/src/common.h index ff3c3c9..f6b9f8a 100644 --- a/src/common.h +++ b/src/common.h @@ -11,11 +11,12 @@ #ifndef COMMON_H #define COMMON_H -#ifndef WANT_DEBUG -#define TRACE -#else + +#ifdef VERBOSE #include -#define TRACE qDebug()<tryToShow(); return app.exec(); @@ -81,7 +69,7 @@ QDateTime qDateTimeFromOfono(const QString &val) // Start by trying to parse this as an ISODate "YYYY-MM-DDTHH:MM:SSTZD" result = QDateTime::fromString(val,Qt::ISODate); -#ifdef WANT_DEBUG +#ifdef VERBOSE qDebug() << QString("Converted %1 with Qt::ISODate: %2") .arg(val) .arg(result.toString()); @@ -98,7 +86,7 @@ QDateTime qDateTimeFromOfono(const QString &val) time_t t = mktime(&time_tm); if (t >= (time_t)(0)) { result.setTime_t(t); -#ifdef WANT_DEBUG +#ifdef VERBOSE qDebug() << QString("Converted %1 with strptime: %2") .arg(val) .arg(result.toString()); diff --git a/src/src.pro b/src/src.pro index 9000eee..7862de5 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,17 +1,23 @@ include (../common.pri) TEMPLATE = app QT += dbus declarative -CONFIG += qdbus mobility qt-mobility link_pkgconfig network debug +CONFIG += qdbus mobility qt-mobility link_pkgconfig network PKGCONFIG += libpulse-mainloop-glib MOBILITY += contacts multimedia MOC_DIR = .moc OBJECTS_DIR = .obj MGEN_OUTDIR = .gen +if (verbose) { + DEFINES += VERBOSE +} + if (wayland) { PKGCONFIG += mlite-wayland ofono-qt-wayland -} else { +} else if (xlib) { PKGCONFIG += mlite-xlib ofono-qt-xlib +} else { + PKGCONFIG += mlite ofono-qt } DEFINES += CONFIG_DEFAULT_TARGET_UX=\\\"tizen-ux-components\\\"