xref: /aosp_15_r20/external/executorch/extension/data_loader/CMakeLists.txt (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
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_data_loader__srcs PREPEND "${EXECUTORCH_ROOT}/")
20add_library(extension_data_loader ${_extension_data_loader__srcs})
21target_link_libraries(extension_data_loader executorch)
22target_include_directories(extension_data_loader PUBLIC ${EXECUTORCH_ROOT}/..)
23target_compile_options(extension_data_loader PUBLIC ${_common_compile_options})
24
25# Install libraries
26install(
27  TARGETS extension_data_loader
28  DESTINATION lib
29  INCLUDES
30  DESTINATION ${_common_include_directories}
31)
32