From d396bdb97f033c502b4181e08026f483fa82d8fe Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 31 Aug 2021 19:20:14 +0100 Subject: [PATCH] CMake: Allow setting the network multicast entitlement --- docs/CMake API.md | 3 +++ extras/Build/CMake/JUCEUtils.cmake | 2 ++ extras/Build/juceaide/Main.cpp | 1 + 3 files changed, 6 insertions(+) diff --git a/docs/CMake API.md b/docs/CMake API.md index e15bbe2c8d..ca4bbf03b7 100644 --- a/docs/CMake API.md +++ b/docs/CMake API.md @@ -400,6 +400,9 @@ attributes directly to these creation functions, rather than adding them later. - `PUSH_NOTIFICATIONS_ENABLED` - Sets app entitlements to allow push notifications. False by default. +- `NETWORK_MULTICAST_ENABLED` + - Sets app entitlements to allow IP multicast or broadcast on macOS/iOS. False by default. + - `HARDENED_RUNTIME_ENABLED` - Enables macOS' hardened runtime for this target. Required for notarisation. False by default. diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index 1b41edc7d3..7f3480e516 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -300,6 +300,7 @@ function(_juce_write_configure_time_info target) _juce_append_target_property(file_content BACKGROUND_AUDIO_ENABLED ${target} JUCE_BACKGROUND_AUDIO_ENABLED) _juce_append_target_property(file_content BACKGROUND_BLE_ENABLED ${target} JUCE_BACKGROUND_BLE_ENABLED) _juce_append_target_property(file_content PUSH_NOTIFICATIONS_ENABLED ${target} JUCE_PUSH_NOTIFICATIONS_ENABLED) + _juce_append_target_property(file_content NETWORK_MULTICAST_ENABLED ${target} JUCE_NETWORK_MULTICAST_ENABLED) _juce_append_target_property(file_content PLUGIN_MANUFACTURER_CODE ${target} JUCE_PLUGIN_MANUFACTURER_CODE) _juce_append_target_property(file_content PLUGIN_CODE ${target} JUCE_PLUGIN_CODE) _juce_append_target_property(file_content IPHONE_SCREEN_ORIENTATIONS ${target} JUCE_IPHONE_SCREEN_ORIENTATIONS) @@ -1497,6 +1498,7 @@ function(_juce_initialise_target target) NEEDS_WEB_BROWSER # Set this true if you want to link webkit on Linux NEEDS_STORE_KIT # Set this true if you want in-app-purchases on Mac PUSH_NOTIFICATIONS_ENABLED + NETWORK_MULTICAST_ENABLED HARDENED_RUNTIME_ENABLED APP_SANDBOX_ENABLED APP_SANDBOX_INHERIT diff --git a/extras/Build/juceaide/Main.cpp b/extras/Build/juceaide/Main.cpp index a3b9a9a428..cdfcda1dba 100644 --- a/extras/Build/juceaide/Main.cpp +++ b/extras/Build/juceaide/Main.cpp @@ -341,6 +341,7 @@ juce::build_tools::EntitlementOptions parseEntitlementsOptions (const juce::File updateField ("APP_SANDBOX_ENABLED", result.isAppSandboxEnabled); updateField ("APP_SANDBOX_INHERIT", result.isAppSandboxInhertianceEnabled); updateField ("APP_SANDBOX_OPTIONS", result.appSandboxOptions); + updateField ("NETWORK_MULTICAST_ENABLED", result.isNetworkingMulticastEnabled); result.type = type;