KhronosGroup / SPIRV-Cross

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Apache License 2.0
2.01k stars 556 forks source link

support spirv-cross C++ library via pkg-config #1624

Open jmoguillansky-gpsw opened 3 years ago

jmoguillansky-gpsw commented 3 years ago

Can spirv-cross add support for using spirv-cross C++ library via pkg-config?

Something like: spirv-cross.pc.in

prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include

Name: spirv-cross Description: SPIRV-Cross Version: @SPIRV_CROSS_VERSION@

Requires: Libs: -L${libdir} -lspirv-cross-cpp -lspirv-cross-core -lspirv-cross-glsl -lspirv-cross-hlsl -lspirv-cross-msl -lspirv-cross-reflect -lspirv-cross-util -lspirv-cross-c Cflags: -I${includedir}

HansKristian-Work commented 3 years ago

It is intentional that there is no C++ API pkg-config. The C++ API is not 100% API/ABI stable, and having distros shipping those is problematic. The C API is designed to be stable for purposes of packaging. The recommended way for C++ API is to link statically.