!24291 fix link py error

Merge pull request !24291 from kisnwang/fix-link-py-error
This commit is contained in:
zhangzhenghai 2021-09-28 07:25:42 +00:00 committed by Gitee
commit 2cbfd52714
1 changed files with 4 additions and 2 deletions

View File

@ -3,8 +3,10 @@ execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c "import distutils.sysconfig as sysconfig; import os; \
print(os.path.join(sysconfig.get_config_var('LIBDIR'), sysconfig.get_config_var('PY3LIBRARY')))"
RESULT_VARIABLE result
OUTPUT_VARIABLE PY3_LIB)
string(STRIP "${PY3_LIB}" PY3_LIB)
OUTPUT_VARIABLE PY3_LIBG)
string(STRIP "${PY3_LIBG}" PY3_LIBG)
message("Python3 general library = " ${PY3_LIBG})
string(STRIP "${PYTHON_LIBRARIES}" PY3_LIB)
message("Python3 library = " ${PY3_LIB})
# build mindspore_shared_lib
include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc)