Add build folder and CMAKE_PREFIX_PATH
-cmake -G "NMake Makefiles" -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% %SRC_DIR%
+mkdir build
+cd build
+
+cmake -G "NMake Makefiles" ^
+ -D BUILD_TESTS=OFF ^
+ -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
+ -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
+ %SRC_DIR%
+
if errorlevel 1 exit 1
nmake
