From 43a21717fa48ac639c12d7781f14254dbe5b2adc Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 17 May 2023 14:19:34 +0800 Subject: [PATCH] Fix macOS build when file provider module build is disabled Signed-off-by: Claudio Cambra --- CMakeLists.txt | 1 + src/gui/application.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d38c8169c..4a644e6e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,6 +190,7 @@ endif() if (APPLE) # build macOS File Provider module option(BUILD_FILE_PROVIDER_MODULE "BUILD_FILE_PROVIDER_MODULE" ON) + add_definitions(-DBUILD_FILE_PROVIDER_MODULE=${BUILD_FILE_PROVIDER_MODULE}) endif() # When this option is enabled, 5xx errors are not added to the blacklist diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 0db5f96d1..3c112b90c 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -403,7 +403,7 @@ Application::Application(int &argc, char **argv) } } -#if defined(Q_OS_MACOS) +#if defined(BUILD_FILE_PROVIDER_MODULE) _fileProvider.reset(new Mac::FileProvider); #endif