File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
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
@@ -229,3 +231,18 @@ install(
229
231
INCLUDES
230
232
DESTINATION ${_common_include_directories}
231
233
)
234
+
235
+ # We only care about building the pybinding when building for macOS wheels.
236
+ if (EXECUTORCH_BUILD_COREML AND EXECUTORCH_BUILD_PYBIND)
237
+ if (NOT TARGET pybind11::pybind11)
238
+ add_subdirectory (${EXECUTORCH_ROOT} /third-party/pybind11 ${CMAKE_CURRENT_BINARY_DIR} /pybind11)
239
+ endif ()
240
+
241
+ pybind11_add_module(executorchcoreml SHARED runtime/inmemoryfs/inmemory_filesystem_py.cpp)
242
+
243
+ target_compile_options (executorchcoreml PRIVATE -mmacosx-version -min=${CMAKE_OSX_DEPLOYMENT_TARGET} )
244
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
245
+ target_compile_options (executorchcoreml PRIVATE -g)
246
+ endif ()
247
+ target_link_libraries (executorchcoreml PRIVATE coreml_util coreml_inmemoryfs)
248
+ endif ()
You can’t perform that action at this time.
0 commit comments