Explorar el Código

Fix macOS build when file provider module build is disabled

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Claudio Cambra hace 2 años
padre
commit
8c795d5dc7
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1 0
      CMakeLists.txt
  2. 1 1
      src/gui/application.cpp

+ 1 - 0
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

+ 1 - 1
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