#-------------------------------------------------
#
# Project created by QtCreator 2016-02-09T21:26:14
#
#-------------------------------------------------

QT       += widgets sql

QT       -= gui

TARGET = commodity
TEMPLATE = lib

DEFINES += COMMODITY_LIBRARY\
        _GLIBCXX_USE_CXX11_ABI=1

SOURCES += commodity.cpp \
    data/commoditydata.cpp \
    data/commoditytypedata.cpp \
    commoditytablemodel.cpp \
    commodityform.cpp \
    commoditygrid.cpp \
    commoditysettingsform.cpp \
    commodityservice.cpp

HEADERS += commodity.h\
        commodity_global.h \
    data/commoditydata.h \
    data/commoditytypedata.h \
    data/commodity-data.h \
    commoditytablemodel.h \
    commodityform.h \
    commoditygrid.h \
    commoditysettingsform.h \
    commodityservice.h

unix {
    target.path = /usr/lib
    INSTALLS += target
    QMAKE_CXXFLAGS += -std=c++11
    QMAKE_CXXFLAGS += -Wno-unknown-pragmas
}

win32 {
    QMAKE_CXXFLAGS += -wd4995 -wd4068
}
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../core/release/ -lcore
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../core/debug/ -lcore
else:unix: LIBS += -L$$OUT_PWD/../core/ -lcore

INCLUDEPATH += $$PWD/../core
DEPENDPATH += $$PWD/../core

DESTDIR = ../plugins

ODB_FILES = commodity/data/commodity-data.h
H_DIR = $$PWD/data/*.h
ODB_OTHER_INCLUDES = -I $$PWD/../shop
include(../odb.pri)

win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../qdecimal/lib/ -lqdecimal -ldecnumber
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../qdecimal/lib/ -lqdecimal -ldecnumber
else:unix: LIBS += -L$$OUT_PWD/../qdecimal/lib/ -lqdecimal -ldecnumber

INCLUDEPATH += $$PWD/../qdecimal/src
INCLUDEPATH += $$PWD/../qdecimal/decnumber
DEPENDPATH += $$PWD/../qdecimal/src

OTHER_FILES += \
    commodity.json

FORMS += \
    commodityform.ui \
    commoditysettingsform.ui

RESOURCES += \
    commodityrc.qrc
TRANSLATIONS = translations/commodity_cs_CZ.ts

win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lshop
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -lshop
else:unix: LIBS += -L$$OUT_PWD/../plugins/ -lshop

INCLUDEPATH += $$PWD/../shop
DEPENDPATH += $$PWD/../shop
