[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#940487: glslang-dev: please codify how to link to the provided libraries (e.g. pkg-config .pc file)



Package: glslang-dev
Version: 7.10.2984-1
Severity: wishlist
Tags: upstream
Forwarded: https://github.com/KhronosGroup/glslang/issues/1715

While backporting glslang-dev to an older Debian derivative I noticed
that there doesn't seem to be an obvious way to link to the supplied
libraries: dependent packages need to have out-of-band knowledge of the
names and interdependencies of all the static libraries, and also have
to know that some (all?) of them depend on libpthread.

It would be great if glslang had pkg-config .pc files, or some similar
way to document/codify how to use each of the APIs it exports.

For example, libplacebo currently needs to have


  glslang_deps = [
    cxx.find_library('glslang',     required: glslang_req),
    cxx.find_library('HLSL',        required: glslang_req),
    cxx.find_library('OGLCompiler', required: glslang_req),
    cxx.find_library('OSDependent', required: glslang_req),
    cxx.find_library('SPIRV',       required: glslang_req),
    cxx.find_library('SPVRemapper', required: glslang_req),
  ]
  ...
    pthread = cxx.find_library('pthread', required: false)
    glslang_combined = declare_dependency(dependencies: glslang_deps + [pthread])

and renderdoc has similar glue, but with CMake instead of Meson, and
without pulling in SPVRemapper or pthread:

    list(APPEND RDOC_LIBRARIES
         PRIVATE -lglslang
         PRIVATE -lHLSL
         PRIVATE -lOGLCompiler
         PRIVATE -lOSDependent
         PRIVATE -lSPIRV)


Reply to: