From bde575b290d3b9a752741ea42d469a0a3daa6cab Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Tue, 23 May 2023 16:29:56 +0200 Subject: [PATCH] find_package: only depend on Qt if BUILD_QT_UI is set to ON (#223) --- cmake/AppImageUpdateConfig.cmake.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/AppImageUpdateConfig.cmake.in b/cmake/AppImageUpdateConfig.cmake.in index eb5926a..5405be1 100644 --- a/cmake/AppImageUpdateConfig.cmake.in +++ b/cmake/AppImageUpdateConfig.cmake.in @@ -3,6 +3,10 @@ # look up dependencies find_package(zsync2 REQUIRED) find_package(libappimage REQUIRED) -find_package(Qt5 REQUIRED COMPONENTS Core Widgets) + +# BUILD_QT_UI +if(@BUILD_QT_UI@) + find_package(Qt5 REQUIRED COMPONENTS Core Widgets) +endif() include("${CMAKE_CURRENT_LIST_DIR}/AppImageUpdateTargets.cmake")