Skip to content
Discussion options

You must be logged in to vote

As discussed above, my problem was adding an absolute path with '--embed-dir=' + meson.current_build_dir(), so a solution for now is not to use meson.current_build_dir(), and instead either simply hardcode the correct relative path from the project build directory (e.g. '--embed-dir=shaders'), or to use fs.relative_to.

This seems to work well, even with includes between glsl sources:

shader_sources = ['test.vert', 'test.frag']
spirv_shaders = []
foreach shader: shader_sources
    spirv_shaders += custom_target(
        shader + '.spv',
        input: shader,
        output: shader + '.spv',
        depfile: shader + '.d',
        command: [glslang, '-V', '@INPUT@', '-o', '@OUTPUT@', '--de…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@dcbaker
Comment options

@dpirch
Comment options

@dcbaker
Comment options

@dpirch
Comment options

@dcbaker
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by dpirch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants