win32 { LIBS += -L"d:/prac/qt/lib" INCLUDEPATH += d:/prac/odb/libodb-2.4.0 INCLUDEPATH += d:/prac/odb/libodb-qt-2.4.0 INCLUDEPATH += d:/prac/odb/libodb-sqlite-2.4.0 INCLUDEPATH += d:/prac/odb/sqlite } win32 { CONFIG(debug, debug|release) { LIBS += -lodb-d -lodb-sqlite-d -lodb-qt-d }else { LIBS += -lodb -lodb-sqlite -lodb-qt } } unix { LIBS += -lodb -lodb-sqlite -lodb-qt } ODB_FLAGS = --database sqlite --profile qt --generate-schema --generate-query --generate-session --at-once --input-name $$TARGET --schema-format sql win32 { ODB_PATH = d:\prac\odb\odb-2.4.0-i686-windows\bin\odb } unix { ODB_PATH = odb } # Select the database we are going to use. # DEFINES += DATABASE_SQLITE # Suppress unknown pragmas GCC warnings. # #QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CXXFLAGS_WARN_ON -Wno-unknown-pragmas # ODB compilation rules. Normally you don't need to change anything here. # # Add the Qt headers directory to the ODB include directory list. # ODB_FLAGS += -I $$[QT_INSTALL_HEADERS] ODB_FLAGS += -I $$[QT_INSTALL_HEADERS]/QtCore ODB_FLAGS += -I $$PWD/core ODB_FLAGS += -I $$PWD/qdecimal/src ODB_FLAGS += -I $$PWD/qdecimal/decnumber ODB_FLAGS += -D __PIC__ win32 { ODB_FLAGS += -I d:/prac/odb/libodb-2.4.0 } # Newer versions of QtCreator do builds in a separate directory. As a # result, we need to append the source directory to ODB files. # for(dir, ODB_FILES) { ODB_PWD_FILES += $$PWD/$${dir} } win32 { H_DIR ~= s,/,\\,g } export(H_DIR) odb.name = odb ${QMAKE_FILE_IN} odb.input = ODB_PWD_FILES odb.output = $$TARGET-odb.cxx odb.commands = $$ODB_PATH $$ODB_FLAGS ${QMAKE_FILE_IN} odb.depends = $$ODB_PWD_FILES odb.variable_out = SOURCES odb.CONFIG = target_predeps odb.clean = $$TARGET-odb.cxx $$TARGET-odb.hxx $$TARGET-odb.ixx $$TARGET.sql QMAKE_EXTRA_COMPILERS += odb odbhc.target = odbhc unix { odbhc.commands = $(COPY) -p $$H_DIR . } win32 { odbhc.commands = $(COPY) $$H_DIR . } QMAKE_EXTRA_TARGETS += odbhc PRE_TARGETDEPS += odbhc