1# Copyright (c) Meta Platforms, Inc. and affiliates. 2# All rights reserved. 3# 4# This source code is licensed under the BSD-style license found in the 5# LICENSE file in the root directory of this source tree. 6 7# Please this file formatted by running: 8# ~~~ 9# cmake-format -i CMakeLists.txt 10# ~~~ 11 12cmake_minimum_required(VERSION 3.19) 13 14# Source root directory for executorch. 15if(NOT EXECUTORCH_ROOT) 16 set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..) 17endif() 18 19add_library(extension_apple) 20 21set(EXPORTED_SOURCES ExecuTorch/Exported/ExecuTorchLog.mm) 22 23target_sources(extension_apple PRIVATE ${EXPORTED_SOURCES}) 24 25target_include_directories(extension_apple PUBLIC ExecuTorch/Exported) 26 27find_library(FOUNDATION_FRAMEWORK Foundation) 28target_link_libraries( 29 extension_apple PRIVATE executorch ${FOUNDATION_FRAMEWORK} 30) 31 32target_compile_options(extension_apple PUBLIC ${_common_compile_options}) 33target_compile_options(extension_apple PRIVATE "-fobjc-arc") 34target_compile_options(extension_apple PRIVATE "-fno-exceptions") 35target_compile_options(extension_apple PRIVATE "-fno-rtti") 36