Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid rebuilding of sqlite #3

Open
JackLilhammers opened this issue Jul 24, 2020 · 0 comments
Open

Avoid rebuilding of sqlite #3

JackLilhammers opened this issue Jul 24, 2020 · 0 comments

Comments

@JackLilhammers
Copy link

JackLilhammers commented Jul 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant