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
This commit is contained in:
Dmitry Marakasov 2018-01-25 19:33:52 +03:00 committed by Daniel Marjamäki
parent 4d66609173
commit 596fc32dd7
1 changed files with 6 additions and 3 deletions

View File

@ -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)