Re-added logging samples to overcome capital L directory

This commit is contained in:
Klaus Basan
2013-04-30 02:50:09 +02:00
parent b38b781aa6
commit b7ce5e6c02
3 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
FILE(GLOB SRC *.cpp)
ADD_EXECUTABLE(sample_logging ${SRC})
TARGET_LINK_LIBRARIES(sample_logging blackmisc ${QT_LIBRARIES})
SET_TARGET_PROPERTIES(sample_logging PROPERTIES PROJECT_LABEL "Samples - Logging")

20
samples/logging/main.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include <QCoreApplication>
#include "blackmisc/debug.h"
#include "blackmisc/context.h"
#include <limits>
#include <iostream>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
BlackMisc::CApplicationContext myApplicationContext;
BlackMisc::IContext::getInstance().setSingleton(new BlackMisc::CDebug());
bAppInfo << "This is a Info log message";
bAppWarning << "This is a bWarning log message";
bAppError << "This is a bError log message";
bAppDebug << "This is a bDebug log message";
return a.exec();
}

View File

@@ -0,0 +1,23 @@
QT += core
QT -= gui
TARGET = sample_logging
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
DEPENDPATH += . ../../src
INCLUDEPATH += . ../../src
SOURCES += *.cpp
LIBS += -L../../lib -lblackmisc
win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a
DESTDIR = ../../bin