Skip to content

Commit

Permalink
Update find_package PythonInterp PythonLibs (#1263)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheng-Bicheng authored May 27, 2024
1 parent 2f426cd commit 570947a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ if (BUILD_PADDLE2ONNX_PYTHON)
endif ()
endif ()

find_package(Python ${PY_VERSION} COMPONENTS Interpreter Development REQUIRED)
# find_package Python has replaced PythonInterp and PythonLibs since cmake 3.12
# Use the following command in the future; now this is only compatible with the latest pybind11
# find_package(Python ${PY_VERSION} COMPONENTS Interpreter Development REQUIRED)
find_package(PythonInterp ${PY_VERSION} REQUIRED)
find_package(PythonLibs ${PY_VERSION})
if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
set(CMAKE_NO_SYSTEM_FROM_IMPORTED 1)
endif ()
Expand Down

0 comments on commit 570947a

Please sign in to comment.