Skip to content

Commit 980279b

Browse files
committed
Update
[ghstack-poisoned]
1 parent 5d15809 commit 980279b

File tree

4 files changed

+24
-15
lines changed

4 files changed

+24
-15
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,12 @@ endif()
570570

571571
if(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER)
572572
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/data_loader)
573+
install(
574+
DIRECTORY extension/data_loader/
575+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/executorch/extension/data_loader
576+
FILES_MATCHING
577+
PATTERN "*.h"
578+
)
573579
endif()
574580

575581
if(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR)

backends/vulkan/CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ if(NOT RUNTIME_PATH)
2424
set(RUNTIME_PATH ${CMAKE_CURRENT_SOURCE_DIR}/runtime)
2525
endif()
2626

27-
# Include this file to access executorch_target_link_options_shared_lib This is required to
28-
# provide access to executorch_target_link_options_shared_lib which allows libraries to be
29-
# linked with the --whole-archive flag. This is required for libraries that
30-
# perform dynamic registration via static initialization.
27+
# Include this file to access executorch_target_link_options_shared_lib This is
28+
# required to provide access to executorch_target_link_options_shared_lib which
29+
# allows libraries to be linked with the --whole-archive flag. This is required
30+
# for libraries that perform dynamic registration via static initialization.
3131
include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
3232

3333
include(cmake/ShaderLibrary.cmake)
@@ -40,8 +40,10 @@ set(VULKAN_HEADERS_PATH ${VULKAN_THIRD_PARTY_PATH}/Vulkan-Headers)
4040
set(VOLK_PATH ${VULKAN_THIRD_PARTY_PATH}/volk)
4141
set(VMA_PATH ${VULKAN_THIRD_PARTY_PATH}/VulkanMemoryAllocator)
4242

43-
set(COMMON_INCLUDES ${EXECUTORCH_ROOT}/.. ${VULKAN_HEADERS_PATH}/include
44-
${VOLK_PATH} ${VMA_PATH}
43+
set(COMMON_INCLUDES
44+
$<BUILD_INTERFACE:${EXECUTORCH_ROOT}/..>
45+
$<BUILD_INTERFACE:${VULKAN_HEADERS_PATH}/include>
46+
$<BUILD_INTERFACE:${VOLK_PATH}> $<BUILD_INTERFACE:${VMA_PATH}>
4547
)
4648

4749
# Compile settings
@@ -96,8 +98,10 @@ add_library(vulkan_schema INTERFACE ${GENERATED_HEADER})
9698
set_target_properties(vulkan_schema PROPERTIES LINKER_LANGUAGE CXX)
9799

98100
target_include_directories(
99-
vulkan_schema INTERFACE ${SCHEMA_INCLUDE_DIR}
100-
${EXECUTORCH_ROOT}/third-party/flatbuffers/include
101+
vulkan_schema
102+
INTERFACE
103+
${SCHEMA_INCLUDE_DIR}
104+
$<BUILD_INTERFACE:${EXECUTORCH_ROOT}/third-party/flatbuffers/include>
101105
)
102106

103107
# vulkan_backend
@@ -134,7 +138,7 @@ endif()
134138
# Test targets
135139

136140
install(
137-
TARGETS vulkan_backend
141+
TARGETS vulkan_backend vulkan_schema
138142
EXPORT ExecuTorchTargets
139143
DESTINATION lib
140144
INCLUDES

test/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..)
2626
include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
2727

2828
# Find prebuilt executorch library
29-
find_package(executorch CONFIG REQUIRED)
29+
30+
list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../)
31+
find_package(executorch CONFIG REQUIRED FIND_ROOT_PATH_BOTH)
3032

3133
# Let files say "include <executorch/path/to/header.h>".
3234
set(_common_include_directories ${EXECUTORCH_ROOT}/..)
33-
target_include_directories(executorch INTERFACE ${_common_include_directories})
3435

3536
#
3637
# The `_<target>_srcs` lists are defined by including ${EXECUTORCH_SRCS_FILE}.
@@ -60,7 +61,6 @@ endif()
6061
# size_test_all_ops: binary with portable ops and no delegate backend
6162
#
6263
add_executable(size_test_all_ops ${_size_test__srcs})
63-
executorch_target_link_options_shared_lib(portable_ops_lib)
6464
target_link_libraries(
6565
size_test_all_ops executorch portable_ops_lib portable_kernels
6666
)
@@ -73,7 +73,6 @@ endif()
7373
#
7474
if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
7575
add_executable(size_test_all_optimized_ops ${_size_test__srcs})
76-
executorch_target_link_options_shared_lib(optimized_native_cpu_ops_lib)
7776
target_link_libraries(
7877
size_test_all_optimized_ops executorch optimized_native_cpu_ops_lib
7978
)

test/build_size_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# LICENSE file in the root directory of this source tree.
77

88
# Build size_test and show the size of it
9-
set -e
9+
set -ex
1010

1111
# shellcheck source=/dev/null
1212
source "$(dirname "${BASH_SOURCE[0]}")/../.ci/scripts/utils.sh"
@@ -28,6 +28,7 @@ cmake_install_executorch_lib() {
2828
-DCMAKE_INSTALL_PREFIX=cmake-out \
2929
-DCMAKE_BUILD_TYPE=Release \
3030
-DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \
31+
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
3132
-DEXECUTORCH_OPTIMIZE_SIZE=ON \
3233
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
3334
${EXTRA_BUILD_ARGS} \
@@ -37,7 +38,6 @@ cmake_install_executorch_lib() {
3738

3839
test_cmake_size_test() {
3940
CXXFLAGS="$COMMON_CXXFLAGS" retry cmake -DCMAKE_BUILD_TYPE=Release \
40-
-DCMAKE_PREFIX_PATH=cmake-out \
4141
-DCMAKE_INSTALL_PREFIX=cmake-out \
4242
${EXTRA_BUILD_ARGS} \
4343
-Bcmake-out/test test

0 commit comments

Comments
 (0)