Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.5KB

  1. #!/bin/bash
  2. set -e
  3. cd $(dirname ${0})
  4. PAWPAW_ROOT="${PWD}"
  5. # ---------------------------------------------------------------------------------------------------------------------
  6. # check target
  7. target="${1}"
  8. if [ -z "${target}" ]; then
  9. echo "usage: ${0} <target>"
  10. exit 1
  11. fi
  12. using_qt=0
  13. # ---------------------------------------------------------------------------------------------------------------------
  14. # run bootstrap dependencies
  15. ./bootstrap-common.sh "${target}"
  16. # ./bootstrap-plugins.sh "${target}"
  17. if [ ${using_qt} -eq 1 ]; then
  18. ./bootstrap-qt.sh "${target}"
  19. fi
  20. # ---------------------------------------------------------------------------------------------------------------------
  21. # source setup code
  22. source setup/check_target.sh
  23. source setup/env.sh
  24. source setup/functions.sh
  25. source setup/versions.sh
  26. # ---------------------------------------------------------------------------------------------------------------------
  27. # wxwidgets
  28. # override PawPaw default
  29. wxwidgets_args="-DBUILD_SHARED_LIBS=ON"
  30. # common flags
  31. wxwidgets_args+=" -DwxBUILD_CXX_STANDARD=14"
  32. wxwidgets_args+=" -DwxBUILD_MONOLITHIC=ON"
  33. wxwidgets_args+=" -DwxBUILD_OPTIMISE=ON"
  34. wxwidgets_args+=" -DwxBUILD_SHARED=ON"
  35. wxwidgets_args+=" -DwxUSE_EXPAT=builtin"
  36. wxwidgets_args+=" -DwxUSE_LIBJPEG=builtin"
  37. wxwidgets_args+=" -DwxUSE_LIBPNG=builtin"
  38. wxwidgets_args+=" -DwxUSE_LIBTIFF=builtin"
  39. wxwidgets_args+=" -DwxUSE_REGEX=builtin"
  40. wxwidgets_args+=" -DwxUSE_ZLIB=builtin"
  41. if [ ${using_qt} -eq 1 ]; then
  42. wxwidgets_args+=" -DwxBUILD_TOOLKIT=qt"
  43. fi
  44. # these match upstream cmake setup
  45. if [ "${MACOS}" -eq 1 ]; then
  46. wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=YES"
  47. wxwidgets_args+=" -DwxBUILD_PRECOMP=NO"
  48. elif [ "${WIN32}" -eq 1 ]; then
  49. wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=YES"
  50. wxwidgets_args+=" -DwxBUILD_PRECOMP=YES"
  51. else
  52. wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=NO"
  53. wxwidgets_args+=" -DwxBUILD_PRECOMP=YES"
  54. fi
  55. # needed for mingw
  56. if [ "${WIN32}" -eq 1 ]; then
  57. wxwidgets_args+=" -DwxUSE_WINSOCK2=yes"
  58. win32_target=_WIN32_WINNT_WIN7
  59. export EXTRA_CXXFLAGS="-DWINVER=${win32_target} -D_WIN32_WINNT=${win32_target} -D_WIN32_IE=${win32_target}"
  60. fi
  61. # needed?
  62. # set(wxVERSION 3.1.3)
  63. # set(wxCOPYRIGHT "1992-2019 wxWidgets")
  64. download wxWidgets "audacity-fixes-3.1.3" "https://github.com/audacity/wxWidgets.git" "" "git"
  65. build_cmake wxWidgets "audacity-fixes-3.1.3" "${wxwidgets_args}"
  66. # ---------------------------------------------------------------------------------------------------------------------