diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 1d3e43b5b8..87a7a1a86f 100644 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -14,6 +14,12 @@ # make package for paddle fluid shared and static library +if(WIN32) + if(NOT PYTHON_EXECUTABLE) + FIND_PACKAGE(PythonInterp REQUIRED) + endif() +endif() + set(COPY_SCRIPT_DIR ${PADDLE_SOURCE_DIR}/cmake) function(copy TARGET) set(options "")