build.sh 683 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. echo "Building ${PKG_NAME}."
  3. # Isolate the build.
  4. mkdir -p Build-${PKG_NAME}
  5. cd Build-${PKG_NAME} || exit 1
  6. # Generate the build files.
  7. echo "Generating the build files."
  8. cmake .. -G"Ninja" ${CMAKE_ARGS} \
  9. -DCMAKE_PREFIX_PATH=$PREFIX \
  10. -DCMAKE_INSTALL_PREFIX=$PREFIX \
  11. -DCMAKE_BUILD_TYPE=Release \
  12. -DCMAKE_INSTALL_LIBDIR=lib \
  13. -DBUILD_SHARED_LIBS=TRUE \
  14. -DFMT_TEST=ON \
  15. -DFMT_DOC=OFF \
  16. -DFMT_INSTALL=ON
  17. # Build.
  18. echo "Building..."
  19. ninja || exit 1
  20. # Perform tests.
  21. echo "Testing..."
  22. ninja test || exit 1
  23. # Installing
  24. echo "Installing..."
  25. ninja install || exit 1
  26. # Error free exit!
  27. echo "Error free exit!"
  28. exit 0