Skip to content

Commit 588fa40

Browse files
committed
address pybind include comment
1 parent 4c09e91 commit 588fa40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backends/apple/coreml/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ install(
234234

235235
# We only care about building the pybinding when building for macOS wheels.
236236
if(EXECUTORCH_BUILD_COREML AND EXECUTORCH_BUILD_PYBIND)
237-
add_subdirectory(${EXECUTORCH_ROOT}/third-party/pybind11 ${CMAKE_CURRENT_BINARY_DIR}/pybind11)
237+
if(NOT TARGET pybind11::pybind11)
238+
add_subdirectory(${EXECUTORCH_ROOT}/third-party/pybind11 ${CMAKE_CURRENT_BINARY_DIR}/pybind11)
239+
endif()
238240

239241
pybind11_add_module(executorchcoreml SHARED runtime/inmemoryfs/inmemory_filesystem_py.cpp)
240242

0 commit comments

Comments
 (0)