[mlir][python] Fix python extension building on windows.
authorStella Laurenzo <stellaraccident@gmail.com>
Thu, 31 Dec 2020 08:11:39 +0000 (00:11 -0800)
committerStella Laurenzo <stellaraccident@gmail.com>
Thu, 31 Dec 2020 08:11:39 +0000 (00:11 -0800)
mlir/cmake/modules/AddMLIRPythonExtension.cmake

index eaba521..290b4a2 100644 (file)
@@ -44,6 +44,10 @@ function(add_mlir_python_extension libname extname)
     "${pybind11_INCLUDE_DIR}"
   )
 
+  target_link_directories(${libname} PRIVATE
+    "${Python3_LIBRARY_DIRS}"
+  )
+
   # The extension itself must be compiled with RTTI and exceptions enabled.
   # Also, some warning classes triggered by pybind11 are disabled.
   target_compile_options(${libname} PRIVATE