diff --git a/backends/xnnpack/cmake/Dependencies.cmake b/backends/xnnpack/cmake/Dependencies.cmake index ca31a1e45cb..71ade68ccb2 100644 --- a/backends/xnnpack/cmake/Dependencies.cmake +++ b/backends/xnnpack/cmake/Dependencies.cmake @@ -68,10 +68,12 @@ install(TARGETS xnnpack-microkernels-prod if(EXECUTORCH_XNNPACK_ENABLE_KLEIDI) - install(TARGETS kleidiai - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + if(TARGET kleidiai) + install(TARGETS kleidiai + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + endif() endif() # Revert PIC Flag to what it originally was diff --git a/tools/cmake/preset/default.cmake b/tools/cmake/preset/default.cmake index f2733f591eb..9afefd4e372 100644 --- a/tools/cmake/preset/default.cmake +++ b/tools/cmake/preset/default.cmake @@ -258,7 +258,7 @@ define_overridable_option( define_overridable_option( EXECUTORCH_XNNPACK_ENABLE_KLEIDI "Enable Arm Kleidi kernels" - BOOL OFF + BOOL ON ) # Turning this on cache weights between partitions and methods. If weights # are shared across methods/partitions then this can reduce load time and