From c4f241a1653c058ed1a207933945f67a60bc24be Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sun, 15 May 2022 13:20:43 +0000 Subject: [PATCH] Make it possible to build without Qalculate This allows me to build without the Qalculate dependency which is only used for the calculator runner. Not having Qalculate installed will still be an error unless the user explicitly passes `-DCMAKE_DISABLE_FIND_PACKAGE_Qalculate=True`. --- CMakeLists.txt | 3 ++- runners/CMakeLists.txt | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de36173e5..70207dd18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,9 +71,10 @@ set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "File Searching" TYPE RECOMMENDED PURPOSE "Needed for the File Search runner." ) -find_package(Qalculate REQUIRED) +find_package(Qalculate) set_package_properties(Qalculate PROPERTIES DESCRIPTION "Qalculate Library" URL "https://qalculate.github.io/" + TYPE REQUIRED PURPOSE "Needed for precise computation in the calculator runner." ) diff --git a/runners/CMakeLists.txt b/runners/CMakeLists.txt index d2c3c2a4b..ec22f27d7 100644 --- a/runners/CMakeLists.txt +++ b/runners/CMakeLists.txt @@ -2,7 +2,9 @@ if(KF5Baloo_FOUND) add_subdirectory(baloo) endif() add_subdirectory(bookmarks) -add_subdirectory(calculator) +if (QALCULATE_FOUND) + add_subdirectory(calculator) +endif() add_subdirectory(helprunner) add_subdirectory(locations) add_subdirectory(places)