Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

build_windows.bat 1.5 KiB

1234567891011121314151617181920212223242526272829303132333435363738
  1. REM Build using MSVC on Windows
  2. REM Requires: git, cmake and ninja
  3. REM You need to run vcvars before running this
  4. REM Build zlib
  5. IF NOT EXIST zlib (
  6. git clone --depth 1 -b v1.2.13 https://github.com/madler/zlib
  7. cd zlib
  8. cmake -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../winpath
  9. cmake --build build -j%NUMBER_OF_PROCESSORS%
  10. cmake --build build --target install
  11. cd ..
  12. )
  13. REM Build libpng
  14. IF NOT EXIST libpng (
  15. git clone --depth 1 -b v1.6.39 https://github.com/glennrp/libpng
  16. cd libpng
  17. cmake -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../winpath -DPNG_STATIC=OFF -DPNG_EXECUTABLES=OFF -DPNG_TESTS=OFF
  18. cmake --build build -j%NUMBER_OF_PROCESSORS%
  19. cmake --build build --target install
  20. cd ..
  21. )
  22. REM Build libsndfile, only with WAV support
  23. IF NOT EXIST libsndfile (
  24. git clone --depth 1 -b 1.2.0 https://github.com/libsndfile/libsndfile
  25. cd libsndfile
  26. cmake -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../winpath -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -DBUILD_PROGRAMS=OFF
  27. cmake --build build -j%NUMBER_OF_PROCESSORS%
  28. cmake --build build --target install
  29. cd ..
  30. )
  31. REM Build aptdec
  32. cmake -B winbuild -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../winpath
  33. cmake --build winbuild -j%NUMBER_OF_PROCESSORS%
  34. cmake --build winbuild --target package