Add glslang to vulkan
This commit is contained in:
		
							parent
							
								
									f9adca6082
								
							
						
					
					
						commit
						3d65c16163
					
				
					 2 changed files with 39 additions and 1 deletions
				
			
		| 
						 | 
					@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive
 | 
				
			||||||
RUN \
 | 
					RUN \
 | 
				
			||||||
    apt-get -y update && \
 | 
					    apt-get -y update && \
 | 
				
			||||||
    apt-get -y dist-upgrade && \
 | 
					    apt-get -y dist-upgrade && \
 | 
				
			||||||
    apt-get -y install build-essential yasm nasm pkg-config git curl wget cmake unzip subversion autoconf automake libtool cmake clang texinfo texi2html gperf ragel libc6-dev gawk meson ninja-build p7zip-full && \
 | 
					    apt-get -y install build-essential yasm nasm pkg-config git curl wget cmake unzip subversion autoconf automake libtool cmake clang texinfo texi2html gperf ragel libc6-dev gawk meson ninja-build p7zip-full python3-distutils python3-apt && \
 | 
				
			||||||
    apt-get -y clean
 | 
					    apt-get -y clean
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ADD run_stage.sh /usr/bin/run_stage
 | 
					ADD run_stage.sh /usr/bin/run_stage
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										38
									
								
								scripts.d/50-glslang.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										38
									
								
								scripts.d/50-glslang.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,38 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GLSLANG_REPO="https://github.com/KhronosGroup/glslang.git"
 | 
				
			||||||
 | 
					GLSLANG_COMMIT="dc1b9762731ebca934143f1852637a48cd5b0656"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_enabled() {
 | 
				
			||||||
 | 
					    [[ $VARIANT != *vulkan* ]] && return -1
 | 
				
			||||||
 | 
					    return 0
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_dockerstage() {
 | 
				
			||||||
 | 
					    to_df "ADD $SELF /stage.sh"
 | 
				
			||||||
 | 
					    to_df "RUN run_stage"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_dockerbuild() {
 | 
				
			||||||
 | 
					    git-mini-clone "$GLSLANG_REPO" "$GLSLANG_COMMIT" glslang
 | 
				
			||||||
 | 
					    cd glslang
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    python3 ./update_glslang_sources.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    mkdir build && cd build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=OFF -DBUILD_EXTERNAL=ON -DBUILD_TESTING=OFF -DENABLE_CTEST=OFF -DENABLE_HLSL=ON -DENABLE_GLSLANG_BINARIES=OFF ..
 | 
				
			||||||
 | 
					    make -j$(nproc)
 | 
				
			||||||
 | 
					    make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    cd ../..
 | 
				
			||||||
 | 
					    rm -rf glslang
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_configure() {
 | 
				
			||||||
 | 
					    echo --enable-libglslang
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_unconfigure() {
 | 
				
			||||||
 | 
					    echo --disable-libglslang
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue