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 TARGET = spectral
packagesExist(QMatrixClient) { isEmpty(USE_SYSTEM_SORTFILTERPROXYMODEL) {
message("Found libQMatrixClient via pkg-config.") USE_SYSTEM_SORTFILTERPROXYMODEL = false
}
isEmpty(USE_SYSTEM_QMATRIXCLIENT) {
USE_SYSTEM_QMATRIXCLIENT = false
}
$$USE_SYSTEM_QMATRIXCLIENT {
PKGCONFIG += QMatrixClient PKGCONFIG += QMatrixClient
} else { } else {
message("Build libQMatrixClient from source.") message("Falling back to built-in libQMatrixClient.")
include(include/libqmatrixclient/libqmatrixclient.pri) include(include/libqmatrixclient/libqmatrixclient.pri)
} }
packagesExist(SortFilterProxyModel) { $$USE_SYSTEM_SORTFILTERPROXYMODEL {
message("Found qqmlsortfilterproxymodel via pkg-config.")
PKGCONFIG += SortFilterProxyModel PKGCONFIG += SortFilterProxyModel
} else { } else {
message("Build qqmlsortfilterproxymodel from source.") message("Falling back to built-in SortFilterProxyModel.")
include(include/SortFilterProxyModel/SortFilterProxyModel.pri) include(include/SortFilterProxyModel/SortFilterProxyModel.pri)
} }