Skip to content

Avoid rebuilding of sqlite #3

Description

@JackLilhammers

You could add a sqlite3.pro to avoid rebuilding sqlite3 each time. Something like this:

INCLUDEPATH += $$PWD

SOURCES += $$PWD/sqlite3.c

HEADERS += $$PWD/sqlite3.h

TARGET = sqlite3
TEMPLATE = lib
CONFIG += \
        staticlib \
        c++14

Of course you'd need to change also sqlite.pri to something like this:

SQLITE3_LIBNAME = sqlite3
win32 {
    CONFIG(release, debug|release) {
        SQLITE3_LIBDIR = $$OUT_PWD/Release
    } else {
        SQLITE3_LIBDIR = $$OUT_PWD/Debug
    }
} else {
    SQLITE3_LIBDIR = $$OUT_PWD
}
INCLUDEPATH += $$PWD
LIBS += \
        -L$$SQLITE3_LIBDIR \
        -l$$SQLITE3_LIBNAME

win32-g++: PRE_TARGETDEPS += $$SQLITE3_LIBDIR/libsqlite3.a
else:win32:!win32-g++: PRE_TARGETDEPS += $$SQLITE3_LIBDIR/sqlite3.lib
else:unix: PRE_TARGETDEPS += $$SQLITE3_LIBDIR/libsqlite3.a

This way you'd avoid reading the tens of warnings generated by compiling sqlite in C++ mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions