Manually choose between embedded libs and shared libs.

Fixes #60.
This commit is contained in:
Black Hat 2018-09-26 18:24:16 +08:00
parent c9d1d68877
commit 7e2ad9194f
1 changed files with 11 additions and 6 deletions

View File

@ -8,18 +8,23 @@ CONFIG += link_pkgconfig
TARGET = spectral
packagesExist(QMatrixClient) {
message("Found libQMatrixClient via pkg-config.")
isEmpty(USE_SYSTEM_SORTFILTERPROXYMODEL) {
USE_SYSTEM_SORTFILTERPROXYMODEL = false
}
isEmpty(USE_SYSTEM_QMATRIXCLIENT) {
USE_SYSTEM_QMATRIXCLIENT = false
}
$$USE_SYSTEM_QMATRIXCLIENT {
PKGCONFIG += QMatrixClient
} else {
message("Build libQMatrixClient from source.")
message("Falling back to built-in libQMatrixClient.")
include(include/libqmatrixclient/libqmatrixclient.pri)
}
packagesExist(SortFilterProxyModel) {
message("Found qqmlsortfilterproxymodel via pkg-config.")
$$USE_SYSTEM_SORTFILTERPROXYMODEL {
PKGCONFIG += SortFilterProxyModel
} else {
message("Build qqmlsortfilterproxymodel from source.")
message("Falling back to built-in SortFilterProxyModel.")
include(include/SortFilterProxyModel/SortFilterProxyModel.pri)
}