Skip to content

An open-source cross-platform alternative to AirDrop

fix(linux): do not fail the build on the appindicator deprecation (#3358)

Victor Carreras8476c091c5a1
diff --git a/app/linux/CMakeLists.txt b/app/linux/CMakeLists.txt
index 857775ba..7e56691e 100644
--- a/app/linux/CMakeLists.txt
+++ b/app/linux/CMakeLists.txt
@@ -91,6 +91,15 @@ set_target_properties(${BINARY_NAME}
# them to the application.
include(flutter/generated_plugins.cmake)
+# tray_manager 0.5.x calls deprecated Ayatana APIs, causing Linux builds
+# to fail because deprecation warnings are treated as errors.
+# TODO: Remove after upgrading to tray_manager >= 0.7.0 (requires Flutter >= 3.47),
+# which drops Ayatana.
+# https://github.com/localsend/localsend/pull/3358
+if(TARGET tray_manager_plugin)
+ target_compile_options(tray_manager_plugin PRIVATE -Wno-error=deprecated-declarations)
+endif()
+
# === Installation ===
# By default, "installing" just makes a relocatable bundle in the build