set PYTHON_LIBRARY explicitly on windows
mkdir build
cd build
+set PYTHON_LIBRARY=%PREFIX%\libs\python%PY_VER:~0,1%%PY_VER:~2,1%.lib
+
:: Configure.
cmake -G "%CMAKE_GENERATOR%" ^
-D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-D PYTHON_DEST=%SP_DIR% ^
-D BUILD_SWIG_PYTHON:BOOL=ON ^
+ -D PYTHON_LIBRARY=%PYTHON_LIBRARY% ^
-D CMAKE_BUILD_TYPE=Release ^
%SRC_DIR%
if errorlevel 1 exit 1
