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 19list(TRANSFORM _extension_tensor__srcs PREPEND "${EXECUTORCH_ROOT}/") 20add_library(extension_tensor ${_extension_tensor__srcs}) 21target_link_libraries(extension_tensor executorch_core) 22target_include_directories(extension_tensor PUBLIC ${EXECUTORCH_ROOT}/..) 23target_compile_options(extension_tensor PUBLIC ${_common_compile_options}) 24 25# Install libraries 26install( 27 TARGETS extension_tensor 28 DESTINATION lib 29 INCLUDES 30 DESTINATION ${_common_include_directories} 31) 32