Skip to content

Call target_link_options_shared_lib in executorch-config.cmake #12320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ install(
INCLUDES
DESTINATION ${_common_include_directories}
)
install(FILES tools/cmake/executorch-config.cmake
install(FILES tools/cmake/Utils.cmake tools/cmake/executorch-config.cmake
DESTINATION lib/cmake/ExecuTorch
)

Expand Down
15 changes: 15 additions & 0 deletions tools/cmake/executorch-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# the contract of exposing these CMake variables.

cmake_minimum_required(VERSION 3.19)
include("${CMAKE_CURRENT_LIST_DIR}/Utils.cmake")

set(_root "${CMAKE_CURRENT_LIST_DIR}/../../..")
set(required_lib_list executorch executorch_core portable_kernels)
Expand Down Expand Up @@ -171,3 +172,17 @@ if(TARGET extension_threadpool)
"cpuinfo;pthreadpool"
)
endif()

set(shared_lib_list
# executorch -- size tests fail due to regression if we include this and I'm not sure it's needed.
optimized_native_cpu_ops_lib
portable_ops_lib
quantized_ops_lib
xnnpack_backend
vulkan_backend
quantized_ops_aot_lib)
foreach(lib ${shared_lib_list})
if(TARGET ${lib})
target_link_options_shared_lib(${lib})
endif()
endforeach()
Loading