glslang icon indicating copy to clipboard operation
glslang copied to clipboard

Fix support to generate cmake config files

Open rhabacker opened this issue 3 years ago • 5 comments

See https://github.com/KhronosGroup/glslang/issues/2751

These commits are used to create and install cmake support files. The extent to which the generated *Config.cmake files are usable and complete would need to be tested.

This can be done by appropriately modifying the cmake build system of projects that use glslang, or by adding a cmake test to this repo based on ctest --build-and-test mode.

The new macro add_cmake_support_files was derived from https://github.com/vsg-dev/VulkanSceneGraph/blob/ad93a77c0e7e3d0ff73552323a1568fecd52239d/cmake/vsgMacros.cmake#L97.

Since this macro is already used in a similar form in more than two repos (glslang, VulkanSceneGraph and sibling repos), after a stabilization period in this repo it might be useful to provide it together with other useful macros in a separate git repo, e.g. vulkan-cmake-macros to avoid cmake code duplication.

rhabacker avatar Oct 13 '21 08:10 rhabacker

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 13 '21 08:10 CLAassistant

I'm in the process of fixing issues discovered by the CI system - when that's done, the commits will be grouped together in a meaningful way.

rhabacker avatar Oct 14 '21 13:10 rhabacker

The error

CMake Error at C:/projects/glslang/build/tmp/SPIRV-Tools/cmake/SPIRV-ToolsConfig.cmake:3 (get_target_property):
  get_target_property() called with non-existent target "SPIRV-Tools".
Call Stack (most recent call first):

is caused by a bug in the generated cmake support file, which is located in the spirv-tools git repo.

rhabacker avatar Oct 15 '21 10:10 rhabacker

This pull request is probably outdated by https://github.com/KhronosGroup/glslang/pull/2989.

rhabacker avatar Sep 06 '22 09:09 rhabacker

Rebased on https://github.com/KhronosGroup/glslang/pull/2989.

Because the SPIRV-Tools-opt development package is now considered a third-party package that must be pre-installed, the client package test fails at msvc.

rhabacker avatar Sep 06 '22 10:09 rhabacker

Closing due to inactivity. Feel free to open a new PR if you want to pick this back up.

arcady-lunarg avatar Apr 06 '23 20:04 arcady-lunarg