• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
14if(NOT CMAKE_CXX_STANDARD)
15  set(CMAKE_CXX_STANDARD 17)
16endif()
17
18# Source root directory for executorch.
19if(NOT EXECUTORCH_ROOT)
20  set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../)
21endif()
22
23include(${EXECUTORCH_ROOT}/build/Test.cmake)
24include(${EXECUTORCH_ROOT}/build/Utils.cmake)
25
26set(_common_include_directories ${EXECUTORCH_ROOT}/..)
27set(_common_compile_options -Wno-deprecated-declarations -fPIC)
28
29add_library(
30  executor_backend STATIC ExecutorBackendRegister.cpp ExecutorBackend.cpp
31)
32target_link_libraries(executor_backend PRIVATE executorch_core)
33
34target_include_directories(
35  executor_backend PUBLIC ${_common_include_directories}
36)
37install(
38  TARGETS executor_backend
39  DESTINATION lib
40  INCLUDES
41  DESTINATION ${_common_include_directories}
42)
43