Skip to content

Commit

Permalink
Fix mac link python (#48017)
Browse files Browse the repository at this point in the history
* finx mac link python

* refine
  • Loading branch information
wanghuancoder authored Nov 16, 2022
1 parent 5033b6c commit 3fa7a73
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion paddle/fluid/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -606,5 +606,12 @@ if(WITH_PYTHON)
target_link_libraries(${SHARD_LIB_NAME} ${os_dependency_modules})
add_dependencies(${SHARD_LIB_NAME} op_function_generator_cmd)

target_link_libraries(${SHARD_LIB_NAME} ${PYTHON_LIBRARIES})
if(APPLE)
string(REGEX REPLACE ".+/(.+)" "\\1" PYTHON_LIBRARY_NAME
${PYTHON_LIBRARIES})
# target_link_libraries(${SHARD_LIB_NAME} "-Wl,-rpath,${PYTHON_LIBRARY_NAME}")
else()
target_link_libraries(${SHARD_LIB_NAME} ${PYTHON_LIBRARIES})
endif()

endif()

0 comments on commit 3fa7a73

Please sign in to comment.