build_mingw64.sh 551 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. # Accomodate both linux windows mingw locations
  3. MINGW=/mingw64
  4. if [ -z "$MSYSCON" ]; then
  5. MINGW=/opt$MINGW
  6. else
  7. CMAKE_OPTS="$CMAKE_OPTS -DLMMS_BUILD_MSYS=1"
  8. fi
  9. export PATH=$MINGW/bin:$PATH
  10. if [ "$1" = "-qt5" ]; then
  11. QT5=True
  12. fi
  13. if [ $QT5 ]; then
  14. CMAKE_OPTS="-DWANT_QT5=$QT5 -DCMAKE_PREFIX_PATH=$MINGW $CMAKE_OPTS"
  15. fi
  16. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  17. cmake $DIR/.. -DCMAKE_TOOLCHAIN_FILE=$DIR/../cmake/modules/Win64Toolchain.cmake -DCMAKE_MODULE_PATH=$DIR/../cmake/modules/ $CMAKE_OPTS