File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ endif()
25
25
26
26
option (COREML_BUILD_EXECUTOR_RUNNER "Build CoreML executor runner." OFF )
27
27
28
+ set (CMAKE_OSX_DEPLOYMENT_TARGET 10.15 )
29
+
28
30
# inmemoryfs sources
29
31
set (INMEMORYFS_SOURCES
30
32
runtime/inmemoryfs/inmemory_filesystem.cpp
@@ -230,7 +232,8 @@ install(
230
232
DESTINATION ${_common_include_directories}
231
233
)
232
234
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> )
234
237
add_subdirectory (${EXECUTORCH_ROOT} /third-party/pybind11 ${CMAKE_CURRENT_BINARY_DIR} /pybind11 )
235
238
236
239
pybind11_add_module (executorchcoreml SHARED runtime/inmemoryfs/inmemory_filesystem_py.cpp )
@@ -239,6 +242,5 @@ if(EXECUTORCH_BUILD_COREML)
239
242
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
240
243
target_compile_options (executorchcoreml PRIVATE -g )
241
244
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 )
244
246
endif ()
You can’t perform that action at this time.
0 commit comments