From 7e2ad9194f2dc1f210225c267bc27521703754e5 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Wed, 26 Sep 2018 18:24:16 +0800 Subject: [PATCH] Manually choose between embedded libs and shared libs. Fixes #60. --- spectral.pro | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/spectral.pro b/spectral.pro index 40dba59..183061d 100644 --- a/spectral.pro +++ b/spectral.pro @@ -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) }