Describe the bug
CMake projects that output files with the same name to ${CMAKE_CURRENT_BINARY_DIR} do not work because in Meson this seems to point to the same directory.
shaderc_options = cmake.subproject_options()
shaderc_options.add_cmake_defines({'SHADERC_SKIP_TESTS': true})
shaderc_options.add_cmake_defines({'SHADERC_SKIP_EXAMPLES': true})
shaderc_options.add_cmake_defines({'SHADERC_ENABLE_SHARED_CRT': true})
shaderc_subp = cmake.subproject('shaderc', options: shaderc_options)
# ideally we would use shaderc_subp.dependency('shaderc_combined') but that does not work
# therefore we combine all dependencies into one.
shaderc = declare_dependency(
dependencies: [
shaderc_subp.dependency('shaderc'),
shaderc_subp.dependency('glslang'),
shaderc_subp.dependency('MachineIndependent'),
shaderc_subp.dependency('GenericCodeGen'),
shaderc_subp.dependency('shaderc_util'),
shaderc_subp.dependency('SPIRV'),
shaderc_subp.dependency('SPIRV-Tools-static'),
shaderc_subp.dependency('SPIRV-Tools-opt'),
],
)
# use shaderc dependency...
It failes with the following error message because the spirv-tools project with is built by shaderc also generates build-version.inc and overwrites the file from shaderc:
Expected behavior
Subdirectories in cmake also get subdirectories in meson. Files do not overwrite each other.
Building the project with CMake works fine.
Describe the bug CMake projects that output files with the same name to
${CMAKE_CURRENT_BINARY_DIR}
do not work because in Meson this seems to point to the same directory.To Reproduce Try to include shaderc as submodule:
subprojects
./utils/git-sync-deps
It failes with the following error message because the spirv-tools project with is built by shaderc also generates
build-version.inc
and overwrites the file from shaderc:Expected behavior Subdirectories in cmake also get subdirectories in meson. Files do not overwrite each other. Building the project with CMake works fine.
Maybe related: https://github.com/mesonbuild/meson/issues/12655
system parameters