45-vulkan.sh 866 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. SCRIPT_REPO="https://github.com/KhronosGroup/Vulkan-Headers.git"
  3. SCRIPT_COMMIT="v1.3.300"
  4. SCRIPT_TAGFILTER="v?.*.*"
  5. ffbuild_enabled() {
  6. [[ $ADDINS_STR == *4.4* ]] && return -1
  7. return 0
  8. }
  9. ffbuild_dockerbuild() {
  10. mkdir build && cd build
  11. cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
  12. -DVULKAN_HEADERS_ENABLE_MODULE=NO -DVULKAN_HEADERS_ENABLE_TESTS=NO -DVULKAN_HEADERS_ENABLE_INSTALL=YES ..
  13. make -j$(nproc)
  14. make install
  15. cat >"$FFBUILD_PREFIX"/lib/pkgconfig/vulkan.pc <<EOF
  16. prefix=$FFBUILD_PREFIX
  17. includedir=\${prefix}/include
  18. Name: vulkan
  19. Version: ${SCRIPT_COMMIT:1}
  20. Description: Vulkan (Headers Only)
  21. Cflags: -I\${includedir}
  22. EOF
  23. }
  24. ffbuild_configure() {
  25. echo --enable-vulkan
  26. }
  27. ffbuild_unconfigure() {
  28. echo --disable-vulkan
  29. }