Skip to content

Commit 596fc32

Browse files
AMDmi3danmar
authored andcommitted
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
1 parent 4d66609 commit 596fc32

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: cmake/findDependencies.cmake

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
set(GUI_QT_COMPONENTS Core Gui Widgets PrintSupport)
2-
find_package(Qt5 COMPONENTS ${GUI_QT_COMPONENTS})
3-
find_package(Qt5LinguistTools)
1+
if (BUILD_GUI)
2+
set(GUI_QT_COMPONENTS Core Gui Widgets PrintSupport)
3+
find_package(Qt5 COMPONENTS ${GUI_QT_COMPONENTS})
4+
find_package(Qt5LinguistTools)
5+
endif()
6+
47
if (HAVE_RULES)
58
find_library(PCRE pcre)
69
if (NOT PCRE)

0 commit comments

Comments
 (0)