Skip to content

Commit 2f299ac

Browse files
committed
address comments
1 parent bb755a1 commit 2f299ac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

backends/apple/coreml/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ endif()
2525

2626
option(COREML_BUILD_EXECUTOR_RUNNER "Build CoreML executor runner." OFF)
2727

28+
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
29+
2830
# inmemoryfs sources
2931
set(INMEMORYFS_SOURCES
3032
runtime/inmemoryfs/inmemory_filesystem.cpp
@@ -230,7 +232,8 @@ install(
230232
DESTINATION ${_common_include_directories}
231233
)
232234

233-
if(EXECUTORCH_BUILD_COREML)
235+
# We only care about building the pybinding when building for macOS wheels.
236+
if(EXECUTORCH_BUILD_COREML AND CMAKE_TOOLCHAIN_IOS AND $<FILTER:${PLATFORM},INCLUDE,MAC>)
234237
add_subdirectory(${EXECUTORCH_ROOT}/third-party/pybind11 ${CMAKE_CURRENT_BINARY_DIR}/pybind11)
235238

236239
pybind11_add_module(executorchcoreml SHARED runtime/inmemoryfs/inmemory_filesystem_py.cpp)
@@ -239,6 +242,5 @@ if(EXECUTORCH_BUILD_COREML)
239242
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
240243
target_compile_options(executorchcoreml PRIVATE -g)
241244
endif()
242-
target_link_libraries(executorchcoreml PRIVATE coreml_util)
243-
target_link_libraries(executorchcoreml PRIVATE coreml_inmemoryfs)
245+
target_link_libraries(executorchcoreml PRIVATE coreml_util coreml_inmemoryfs)
244246
endif()

0 commit comments

Comments
 (0)