Cleaned qmake project files. Configuration and common parts are now in config_plugin.pri and config_odb.pri.

print
Josef Rokos 8 years ago
parent fecee4d6e7
commit af5f2c357f

@ -9,8 +9,7 @@ QT += widgets sql
TARGET = accommodation TARGET = accommodation
TEMPLATE = lib TEMPLATE = lib
DEFINES += ACCOMMODATION_LIBRARY\ DEFINES += ACCOMMODATION_LIBRARY
_GLIBCXX_USE_CXX11_ABI=1
SOURCES += accommodation.cpp \ SOURCES += accommodation.cpp \
data/person.cpp \ data/person.cpp \
@ -30,25 +29,7 @@ HEADERS += accommodation.h\
data/address.h \ data/address.h \
data/accommodation-data.h data/accommodation-data.h
unix { include(../config_plugin.pri)
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
OTHER_FILES += \ OTHER_FILES += \
accommodation.json accommodation.json
@ -60,13 +41,6 @@ ODB_FILES = accommodation/data/accommodation-data.h
H_DIR = $$PWD/data/*.h H_DIR = $$PWD/data/*.h
include(../odb.pri) 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
RESOURCES += \ RESOURCES += \
accrc.qrc accrc.qrc

@ -28,34 +28,7 @@ HEADERS += addressbook.h\
addressbooktablemodel.h \ addressbooktablemodel.h \
addressbookservice.h addressbookservice.h
unix { include(../config_plugin.pri)
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
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
ODB_FILES = addressbook/data/addressbookdata.h ODB_FILES = addressbook/data/addressbookdata.h
H_DIR = $$PWD/data/*.h H_DIR = $$PWD/data/*.h

@ -13,11 +13,15 @@ TEMPLATE = app
DEFINES += _GLIBCXX_USE_CXX11_ABI=1 DEFINES += _GLIBCXX_USE_CXX11_ABI=1
CONFIG += c++11
include(../config_odb.pri)
win32 { win32 {
INCLUDEPATH += d:/prac/odb/libodb-2.4.0 INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-2.4.0
INCLUDEPATH += d:/prac/odb/libodb-qt-2.4.0 INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-qt-2.4.0
INCLUDEPATH += d:/prac/odb/libodb-sqlite-2.4.0 INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-sqlite-2.4.0
INCLUDEPATH += d:/prac/odb/sqlite INCLUDEPATH += $$ODB_INCLUDE_PREFIX/sqlite
} }
SOURCES += main.cpp\ SOURCES += main.cpp\
@ -32,7 +36,6 @@ FORMS += mainwindow.ui \
unix { unix {
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -Wno-unknown-pragmas QMAKE_CXXFLAGS += -Wno-unknown-pragmas
} }
@ -58,5 +61,3 @@ RESOURCES += \
appRc.qrc appRc.qrc
TRANSLATIONS = translations/prodejna_cz.ts TRANSLATIONS = translations/prodejna_cz.ts
DISTFILES +=

@ -11,8 +11,7 @@ QT -= gui
TARGET = commodity TARGET = commodity
TEMPLATE = lib TEMPLATE = lib
DEFINES += COMMODITY_LIBRARY\ DEFINES += COMMODITY_LIBRARY
_GLIBCXX_USE_CXX11_ABI=1
SOURCES += commodity.cpp \ SOURCES += commodity.cpp \
data/commoditydata.cpp \ data/commoditydata.cpp \
@ -34,38 +33,13 @@ HEADERS += commodity.h\
commoditysettingsform.h \ commoditysettingsform.h \
commodityservice.h commodityservice.h
unix { include(../config_plugin.pri)
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 ODB_FILES = commodity/data/commodity-data.h
H_DIR = $$PWD/data/*.h H_DIR = $$PWD/data/*.h
ODB_OTHER_INCLUDES = -I $$PWD/../shop ODB_OTHER_INCLUDES = -I $$PWD/../shop
include(../odb.pri) 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 += \ OTHER_FILES += \
commodity.json commodity.json

@ -0,0 +1,4 @@
win32 {
LIB_PATH = d:/prac/qt/lib
ODB_INCLUDE_PREFIX = d:/prac/odb
}

@ -0,0 +1,30 @@
DEFINES += _GLIBCXX_USE_CXX11_ABI=1
CONFIG += c++11
unix {
target.path = /usr/lib
INSTALLS += target
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
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
DESTDIR = ../plugins

@ -14,6 +14,8 @@ TEMPLATE = lib
DEFINES += CORE_LIBRARY \ DEFINES += CORE_LIBRARY \
_GLIBCXX_USE_CXX11_ABI=1 _GLIBCXX_USE_CXX11_ABI=1
CONFIG += c++11
SOURCES += \ SOURCES += \
data/user.cpp \ data/user.cpp \
context.cpp \ context.cpp \
@ -119,7 +121,6 @@ HEADERS += core.h\
unix { unix {
target.path = /usr/lib target.path = /usr/lib
INSTALLS += target INSTALLS += target
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -Wno-unknown-pragmas QMAKE_CXXFLAGS += -Wno-unknown-pragmas
} }
@ -128,7 +129,6 @@ win32 {
} }
ODB_FILES = core/data/core-data.h ODB_FILES = core/data/core-data.h
H_DIR = $$PWD/data/*.h H_DIR = $$PWD/data/*.h
include(../odb.pri) include(../odb.pri)

@ -1,9 +1,11 @@
include(config_odb.pri)
win32 { win32 {
LIBS += -L"d:/prac/qt/lib" LIBS += -L$$LIB_PATH
INCLUDEPATH += d:/prac/odb/libodb-2.4.0 INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-2.4.0
INCLUDEPATH += d:/prac/odb/libodb-qt-2.4.0 INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-qt-2.4.0
INCLUDEPATH += d:/prac/odb/libodb-sqlite-2.4.0 INCLUDEPATH += $$ODB_INCLUDE_PREFIX/libodb-sqlite-2.4.0
INCLUDEPATH += d:/prac/odb/sqlite INCLUDEPATH += $$ODB_INCLUDE_PREFIX/sqlite
} }
win32 { win32 {
@ -21,7 +23,7 @@ unix {
ODB_FLAGS += --database sqlite --profile qt --generate-schema --generate-query --generate-session --at-once --input-name $$TARGET --schema-format sql ODB_FLAGS += --database sqlite --profile qt --generate-schema --generate-query --generate-session --at-once --input-name $$TARGET --schema-format sql
win32 { win32 {
ODB_PATH = d:\prac\odb\odb-2.4.0-i686-windows\bin\odb ODB_PATH = $$ODB_INCLUDE_PREFIX\odb-2.4.0-i686-windows\bin\odb
} }
unix { unix {
ODB_PATH = odb ODB_PATH = odb
@ -46,10 +48,10 @@ ODB_FLAGS += -I $$PWD/core
ODB_FLAGS += -I $$PWD/qdecimal/src ODB_FLAGS += -I $$PWD/qdecimal/src
ODB_FLAGS += -I $$PWD/qdecimal/decnumber ODB_FLAGS += -I $$PWD/qdecimal/decnumber
ODB_FLAGS += $$ODB_OTHER_INCLUDES ODB_FLAGS += $$ODB_OTHER_INCLUDES
ODB_FLAGS += -x -std=c++11 -x -fPIC ODB_FLAGS += -x -std=c++11
win32 { win32 {
ODB_FLAGS += -I d:/prac/odb/libodb-2.4.0 ODB_FLAGS += -I $$ODB_INCLUDE_PREFIX/libodb-2.4.0
} }
# Newer versions of QtCreator do builds in a separate directory. As a # Newer versions of QtCreator do builds in a separate directory. As a
@ -72,9 +74,17 @@ odb.commands = $$ODB_PATH $$ODB_FLAGS ${QMAKE_FILE_IN}
odb.depends = $$ODB_PWD_FILES odb.depends = $$ODB_PWD_FILES
odb.variable_out = SOURCES odb.variable_out = SOURCES
odb.CONFIG = target_predeps odb.CONFIG = target_predeps
odb.clean = $$TARGET-odb.cxx $$TARGET-odb.hxx $$TARGET-odb.ixx $$TARGET.sql odb.clean = $$TARGET-odb.cxx $$TARGET-odb.hxx $$TARGET-odb.ixx $$TARGET.sql *.h *.sql
QMAKE_EXTRA_COMPILERS += odb QMAKE_EXTRA_COMPILERS += odb
odbh.name = odb ${QMAKE_FILE_IN}
odbh.input = ODB_PWD_FILES
odbh.output = $$TARGET-odb.hxx
odbh.commands = @true
odbh.depends = $$TARGET-odb.cxx
odbh.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += odbh
odbhc.target = odbhc odbhc.target = odbhc
unix { unix {
odbhc.commands = $(COPY) -p $$H_DIR . odbhc.commands = $(COPY) -p $$H_DIR .

@ -7,7 +7,7 @@ SUBDIRS += \
application \ application \
accommodation \ accommodation \
services \ services \
commodity \
addressbook \ addressbook \
shop shop \
commodity

@ -26,30 +26,10 @@ HEADERS += services.h\
accservicestablemodel.h \ accservicestablemodel.h \
accservicegrid.h accservicegrid.h
unix { include(../config_plugin.pri)
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
OTHER_FILES += service.json OTHER_FILES += service.json
ODB_FILES = services/data/accservice.h ODB_FILES = services/data/accservice.h
H_DIR = $$PWD/data/*.h H_DIR = $$PWD/data/*.h
include(../odb.pri) include(../odb.pri)
@ -57,19 +37,6 @@ include(../odb.pri)
FORMS += \ FORMS += \
accserviceform.ui accserviceform.ui
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
#win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../qdecimal/src/release/libqdecimal.a
#else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../qdecimal/src/debug/libqdecimal.a
#else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../qdecimal/src/release/qdecimal.lib
#else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../qdecimal/src/debug/qdecimal.lib
#else:unix: PRE_TARGETDEPS += $$OUT_PWD/../qdecimal/src/libqdecimal.a
RESOURCES += \ RESOURCES += \
servicesrc.qrc servicesrc.qrc

@ -10,7 +10,6 @@ TARGET = shop
TEMPLATE = lib TEMPLATE = lib
DEFINES += SHOP_LIBRARY\ DEFINES += SHOP_LIBRARY\
_GLIBCXX_USE_CXX11_ABI=1
SOURCES += shop.cpp \ SOURCES += shop.cpp \
data/voucher.cpp \ data/voucher.cpp \
@ -55,34 +54,7 @@ HEADERS += shop.h\
data/favorititem.h \ data/favorititem.h \
settings/favoriteservice.h settings/favoriteservice.h
unix { include(../config_plugin.pri)
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
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
else:unix: LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
INCLUDEPATH += $$PWD/../addressbook/data
INCLUDEPATH += $$PWD/../addressbook
INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/../addressbook
DESTDIR = ../plugins
OTHER_FILES += shop.json OTHER_FILES += shop.json
@ -91,14 +63,6 @@ H_DIR = $$PWD/data/*.h
ODB_OTHER_INCLUDES = -I $$PWD/../addressbook/data -I $$PWD/ ODB_OTHER_INCLUDES = -I $$PWD/../addressbook/data -I $$PWD/
include(../odb.pri) 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
RESOURCES += \ RESOURCES += \
shoprc.qrc shoprc.qrc
@ -112,4 +76,13 @@ FORMS += \
paydialog.ui \ paydialog.ui \
paydvouchersdialog.ui paydvouchersdialog.ui
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
else:unix: LIBS += -L$$OUT_PWD/../plugins/ -laddressbook
INCLUDEPATH += $$PWD/../addressbook/data
INCLUDEPATH += $$PWD/../addressbook
INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/../addressbook
TRANSLATIONS = translations/shop_cs_CZ.ts TRANSLATIONS = translations/shop_cs_CZ.ts

Loading…
Cancel
Save