mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-14 17:41:39 +08:00
#12 Fixing linux build
This commit is contained in:
6
samples/logging/CMakeLists.txt
Normal file
6
samples/logging/CMakeLists.txt
Normal 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
18
samples/logging/main.cpp
Normal 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();
|
||||
}
|
||||
31
samples/logging/sample_logging.pro
Normal file
31
samples/logging/sample_logging.pro
Normal 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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user