#12 Fixing linux build

This commit is contained in:
Roland Winklmeier
2013-03-30 17:41:04 +01:00
parent eea8405e1c
commit 585c4db578
27 changed files with 68 additions and 37 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")

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

@@ -0,0 +1,18 @@
#include <QCoreApplication>
#include "blackmisc/debug.h"
#include "blackcore/constants.h"
#include <limits>
#include <iostream>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
BlackMisc::CApplicationContext myApplicationContext;
bInfo << "This is a Info log message";
bWarning << "This is a bWarning log message";
bError << "This is a bError log message";
bDebug << "This is a bDebug log message";
return a.exec();
}

View File

@@ -0,0 +1,31 @@
QT += core
QT -= gui
TARGET = sample_logging
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
DEPENDPATH += . ../../src
INCLUDEPATH += . ../../src
SOURCES += main.cpp\
win32-msvc* {
PRE_TARGETDEPS += ../../lib/blackmisc.lib \
LIBS += ../../lib/blackmisc.lib \
}
!win32-msvc* {
PRE_TARGETDEPS += ../../lib/libblackmisc.a \
LIBS += ../../lib/libblackmisc.a \
}
DESTDIR = ../../bin