spirv-cross/cci.20211113

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Recipe info
2023-03-08

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
spirv-cross/cci.20211113

Using spirv-cross

Note

If you are new with Conan, we recommend to read the section how to consume packages.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
spirv-cross/cci.20211113
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("spirv-cross/cci.20211113")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): spirv-cross
  • CMake target name(s): spirv-cross::spirv-cross
  • spirv-cross-c => spirv-cross-c
    spirv-cross-cpp => spirv-cross-cpp
    spirv-cross-msl => spirv-cross-msl
    spirv-cross-core => spirv-cross-core
    spirv-cross-glsl => spirv-cross-glsl
    spirv-cross-hlsl => spirv-cross-hlsl
    spirv-cross-util => spirv-cross-util
    spirv-cross-reflect => spirv-cross-reflect
    
  • pkg-config file name(s): spirv-cross.pc
  • spirv-cross-c => spirv-cross-spirv-cross-c.pc
    spirv-cross-cpp => spirv-cross-spirv-cross-cpp.pc
    spirv-cross-msl => spirv-cross-spirv-cross-msl.pc
    spirv-cross-core => spirv-cross-spirv-cross-core.pc
    spirv-cross-glsl => spirv-cross-spirv-cross-glsl.pc
    spirv-cross-hlsl => spirv-cross-spirv-cross-hlsl.pc
    spirv-cross-util => spirv-cross-spirv-cross-util.pc
    spirv-cross-reflect => spirv-cross-spirv-cross-reflect.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(spirv-cross REQUIRED)
# ...
target_link_libraries(YOUR_TARGET spirv-cross::spirv-cross)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the spirv-cross homepage listed above:

#include "spirv_cross/GLSL.std.450.h"
#include "spirv_cross/spirv.h"
#include "spirv_cross/spirv.hpp"
#include "spirv_cross/spirv_cfg.hpp"
#include "spirv_cross/spirv_common.hpp"
#include "spirv_cross/spirv_cpp.hpp"
#include "spirv_cross/spirv_cross.hpp"
#include "spirv_cross/spirv_cross_c.h"
#include "spirv_cross/spirv_cross_containers.hpp"
#include "spirv_cross/spirv_cross_error_handling.hpp"
#include "spirv_cross/spirv_cross_parsed_ir.hpp"
#include "spirv_cross/spirv_cross_util.hpp"
#include "spirv_cross/spirv_glsl.hpp"
#include "spirv_cross/spirv_hlsl.hpp"
#include "spirv_cross/spirv_msl.hpp"
#include "spirv_cross/spirv_parser.hpp"
#include "spirv_cross/spirv_reflect.hpp"