bld.bat 757 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. :: cmd
  2. echo "Building %PKG_NAME%."
  3. :: Isolate the build.
  4. mkdir Build-%PKG_NAME%
  5. cd Build-%PKG_NAME%
  6. if errorlevel 1 exit /b 1
  7. :: Generate the build files.
  8. echo "Generating the build files."
  9. cmake .. -G"Ninja" %CMAKE_ARGS% ^
  10. -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
  11. -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
  12. -DCMAKE_BUILD_TYPE=Release ^
  13. -DFMT_TEST=ON ^
  14. -DFMT_DOC=OFF ^
  15. -DBUILD_SHARED_LIBS=TRUE ^
  16. -DFMT_INSTALL=ON
  17. :: Build.
  18. echo "Building..."
  19. ninja
  20. if errorlevel 1 exit 1
  21. :: Perforem tests.
  22. echo "Testing..."
  23. ninja test
  24. if errorlevel 1 exit 1
  25. :: Install.
  26. echo "Installing..."
  27. ninja install
  28. if errorlevel 1 exit 1
  29. :: Error free exit.
  30. echo "Error free exit!"
  31. exit 0