From 596fc32dd795e3377fd30d9c096eb62d146d9b32 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Thu, 25 Jan 2018 19:33:52 +0300 Subject: [PATCH] Don't try to detect Qt if GUI is disabled (#1057) Otherwise the build may fail if Qt libraries are installed but qmake is not --- cmake/findDependencies.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake index 05a13c92e..a287f5cea 100644 --- a/cmake/findDependencies.cmake +++ b/cmake/findDependencies.cmake @@ -1,6 +1,9 @@ -set(GUI_QT_COMPONENTS Core Gui Widgets PrintSupport) -find_package(Qt5 COMPONENTS ${GUI_QT_COMPONENTS}) -find_package(Qt5LinguistTools) +if (BUILD_GUI) + set(GUI_QT_COMPONENTS Core Gui Widgets PrintSupport) + find_package(Qt5 COMPONENTS ${GUI_QT_COMPONENTS}) + find_package(Qt5LinguistTools) +endif() + if (HAVE_RULES) find_library(PCRE pcre) if (NOT PCRE)