#-------------------------------------------------
#
# Project created by QtCreator 2016-12-29T14:54:29
#
#-------------------------------------------------

QT       -= gui
TEMPLATE = lib
DEFINES += FMPLOGGER_LIBRARY

#Source files and headers
SOURCES += \
    fmp_logger.cpp \
    fmp_logger_plugin.cpp \
    fmp_logger_p.cpp

HEADERS += \
    fmp_logger_plugin_p.h \
    fmp_logger_i.h \
    fmp_logger.h \
    fmp_logstream.h \
    fmp_logger_p.h \
    fmp_logger_def.h

unix {
    target.path = /usr/lib
    INSTALLS += target
}

#Target name
VER = $$system($$PWD/../fmprc.bat $$TARGET)
#VER = 0.1.1
ORIGIN_TARGET = $$TARGET
TARGET = $${TARGET}_$${VER}

#Header path
INCLUDEPATH += $$PWD/../include/common \
            += $$PWD/../include/ctk \
            += $$PWD/../include/interface 
INCLUDEPATH += $$PWD/../include/log4cxx

#Library path
LIBS += -L$$PWD/../lib

CONFIG(debug, debug|release) {
    #Linking library
    LIBS += -lCTKCored -lCTKPluginFrameworkd -llog4cxxd
    #Destination path
    DESTDIR = $$PWD/../debug/plugins
} else {
    LIBS += -lCTKCore -lCTKPluginFramework -llog4cxx
    DESTDIR = $$PWD/../release/plugins
}

#Resources
RESOURCES += \
    res/$${ORIGIN_TARGET}.qrc

win32 {
    RC_FILE += res/$${ORIGIN_TARGET}.rc
    system($$PWD/../fmprc.bat $$PWD/version.h $$ORIGIN_TARGET)
}
else {
    system($$PWD/../fmprc.sh $$PWD/version.h $$ORIGIN_TARGET)
}
