# # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed by the License, # or, if provided, by the license below or the license accompanying this file. Do not # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # set(LY_LINK_OPTIONS PRIVATE -ObjC ) # Add resources and app icons to launchers list(APPEND candidate_paths ${project_real_path}/Resources/Platform/iOS) list(APPEND candidate_paths ${project_real_path}/Gem/Resources/Platform/iOS) # Legacy projects list(APPEND candidate_paths ${project_real_path}/Gem/Resources/IOSLauncher) # Legacy projects foreach(resource_path IN LISTS candidate_paths) if(EXISTS ${resource_path}) set(ly_game_resource_folder ${resource_path}) break() endif() endforeach() if(NOT EXISTS ${ly_game_resource_folder}) list(JOIN candidate_paths " " formatted_error) message(FATAL_ERROR "Missing 'Resources' folder. Candidate paths tried were: ${formatted_error}") endif() target_sources(${project_name}.GameLauncher PRIVATE ${ly_game_resource_folder}/Images.xcassets) set_target_properties(${project_name}.GameLauncher PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${ly_game_resource_folder}/Info.plist RESOURCE ${ly_game_resource_folder}/Images.xcassets XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME ${project_name}AppIcon ) set(layout_tool_dir ${LY_ROOT_FOLDER}/cmake/Tools) add_custom_command(TARGET ${project_name}.GameLauncher POST_BUILD COMMAND ${LY_PYTHON_CMD} layout_tool.py -p iOS -a ${LY_ASSET_DEPLOY_ASSET_TYPE} --project-path ${project_real_path} -m ${LY_ASSET_DEPLOY_MODE} --create-layout-root -l $/assets --build-config $ --warn-on-missing-assets --verify --copy ${LY_OVERRIDE_PAK_ARGUMENT} WORKING_DIRECTORY ${layout_tool_dir} COMMENT "Synchronizing Layout Assets ..." VERBATIM )