Fix macOS build when file provider module build is disabled
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 May 2023 06:19:34 +0000 (14:19 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 1 Jun 2023 04:43:37 +0000 (12:43 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
CMakeLists.txt
src/gui/application.cpp

index d38c8169c5b26248205d5dd108dd37e0f97611d1..4a644e6e7077eae73cfbc33d09573f936ac09be5 100644 (file)
@@ -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
index 0db5f96d16d3be0ed2b0ee321ab450157f3ee1fc..3c112b90c72bbb26ed32c3436c3124c48280d0e2 100644 (file)
@@ -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