diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 1d3e43b5b883fe425846ed6e73b3802945b1f74b..87a7a1a86f190a8fb07b8af18987986f4ab7fd7e 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 "")