From 6c71d961882ea3801878ba152f43866454d682b0 Mon Sep 17 00:00:00 2001 From: reuk Date: Fri, 24 Apr 2020 21:16:20 +0100 Subject: [PATCH] CMake: Add useful defaults for iphone/ipad screen orientations --- examples/DemoRunner/CMakeLists.txt | 4 +--- extras/Build/CMake/JUCEUtils.cmake | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/DemoRunner/CMakeLists.txt b/examples/DemoRunner/CMakeLists.txt index c8a3d463e2..25f0f2b455 100644 --- a/examples/DemoRunner/CMakeLists.txt +++ b/examples/DemoRunner/CMakeLists.txt @@ -23,9 +23,7 @@ juce_add_gui_app(DemoRunner CAMERA_PERMISSION_ENABLED TRUE BLUETOOTH_PERMISSION_ENABLED TRUE FILE_SHARING_ENABLED TRUE - DOCUMENT_BROWSER_ENABLED TRUE - IPHONE_SCREEN_ORIENTATIONS portrait landscape - IPAD_SCREEN_ORIENTATIONS portrait landscape) + DOCUMENT_BROWSER_ENABLED TRUE) juce_generate_juce_header(DemoRunner) diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index fd12e5d3b4..010b97edcb 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -1534,6 +1534,14 @@ function(_juce_set_fallback_properties target) set_target_properties(${target} PROPERTIES JUCE_SHOULD_ADD_STORYBOARD ${needs_storyboard}) + _juce_set_property_if_not_set(${target} IPHONE_SCREEN_ORIENTATIONS + UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight) + + _juce_set_property_if_not_set(${target} IPAD_SCREEN_ORIENTATIONS + UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight) + _juce_set_property_if_not_set(${target} LAUNCH_STORYBOARD_FILE "${JUCE_CMAKE_UTILS_DIR}/LaunchScreen.storyboard")