Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pkgconfig file in the sources #1715

Open
sl1pkn07 opened this issue Mar 6, 2019 · 4 comments · May be fixed by #3371
Open

Add pkgconfig file in the sources #1715

sl1pkn07 opened this issue Mar 6, 2019 · 4 comments · May be fixed by #3371

Comments

@sl1pkn07
Copy link

sl1pkn07 commented Mar 6, 2019

Hi

is possible add a pkgconfig file in the sources, like vulkan-loader and spirv-tools?

greetings

@sl1pkn07
Copy link
Author

sl1pkn07 commented Apr 1, 2019

Hi

any notice about this?

greetings

@smcv
Copy link

smcv commented Sep 16, 2019

Generating pkg-config metadata would be a useful way to codify what is necessary to link to each of the API entry points provided by glslang. Sections of the API that are identifiably different (like the C++ class interface vs. the C functional interface, or any features that pull in additional dependencies) might benefit from separate .pc files.

At the moment, users of glslang need to know the names of all the static libraries, as well as the dependencies between them, and the fact that some (all?) need -lpthread on platforms that have it. pkg-config metadata could reduce this to something like:

# CMake
pkg_check_modules (GLSLANG REQUIRED glslang>=7.10)
# ... compile with ${GLSLANG_INCLUDEDIR}, link with ${GLSLANG_LIBRARIES}

# or Meson
glslang = dependency('glslang', version : '>=7.10')
executable(..., dependencies : [glslang])

# or Autotools
PKG_CHECK_MODULES([GLSLANG], [glslang >= 7.10])
# ... compile with ${GLSLANG_CFLAGS}, link with ${GLSLANG_LIBS}

# or plain Make/shell
c++ -oexample example.cpp $(pkg-config --cflags --libs "glslang >= 7.10")

@smcv
Copy link

smcv commented Nov 24, 2019

The Fedora packaging at https://src.fedoraproject.org/rpms/glslang/tree/master seems to have patches for this, which have also been applied in Debian.

@danyspin97
Copy link

Pull request #2083 upstream Fedora patch.

jasonliu-- added a commit to jasonliu--/glslang that referenced this issue Oct 21, 2023
This commit causes CMake to generate a pkg-config file when ENABLE_GLSLANG_INSTALL is enabled. This allows software projects that use pkg-config (and not CMake) to find external dependencies (e.g., Godot 4.x), to find and properly link to a pre-built glslang package.

Closes KhronosGroup#1715.
@jasonliu-- jasonliu-- linked a pull request Oct 21, 2023 that will close this issue
jasonliu-- added a commit to jasonliu--/glslang that referenced this issue Oct 21, 2023
This commit causes CMake to generate a pkg-config file when ENABLE_GLSLANG_INSTALL is enabled. This allows software projects that use pkg-config (and not CMake) to find external dependencies (e.g., Godot 4.x), to find and properly link to a pre-built glslang package.

Closes KhronosGroup#1715.
jasonliu-- added a commit to jasonliu--/glslang that referenced this issue Oct 21, 2023
This commit causes CMake to generate a pkg-config file when `ENABLE_GLSLANG_INSTALL` is enabled. This allows software projects that use pkg-config (and not CMake) to locate external dependencies (e.g., Godot 4.x), to find and properly link to a pre-built glslang package.

Closes KhronosGroup#1715.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants