Skip to content

Conversation

@nikitalita
Copy link
Contributor

@nikitalita nikitalita commented Dec 20, 2025

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

In our port, we apply a patch to the build to link against the glslang and SPIRV-Tools libraries. While the generated cmake config files reflect this change, the generated pkgconfig file did not, resulting in errors when linking against this library with pkgconfig. This change fixes that.

Additionally, I also added in creation of a shaderc pkgconfig file in addition to the shaderc_static pkgconfig file when building statically. This change brings it in-line with how pkgconfig files are generated for other libraries: the static library has the same name as the shared library, and there is no pc generated for the DLL. This fixes scenarios where we may be building a static shaderc library but dynamic other libraries that depend on it and won't pass in --static to pkgconfig (which is likely to happen, since shaderc is only built statically).

In our port, we apply a patch to the build to link against the `glslang` and `SPIRV-Tools` libraries.
While the generated cmake config files reflect this change, the generated pkgconfig file did not. This change fixes that.

Additionally, I also added in creation of a `shaderc` pkgconfig file in addition to the `shaderc_static` pkgconfig file when building statically.
This change brings it in-line with how pkgconfig files are generated for other libraries (the static library has the same name as the shared library),
and fixes scenarios where we may be building a static `shaderc` library but dynamic other libraries that depend on it.
@dg0yt
Copy link
Contributor

dg0yt commented Dec 20, 2025

Additionally, I also added in creation of a shaderc pkgconfig file in addition to the shaderc_static pkgconfig file when building statically. This change brings it in-line with how pkgconfig files are generated for other libraries: the static library has the same name as the shared library, and there is no pc generated for the DLL. This fixes scenarios where we may be building a static shaderc library but dynamic other libraries that depend on it and won't pass in --static to pkgconfig (which is likely to happen, since shaderc is only built statically).

IMO this sound quite confusing. At least in vcpkg, there should be one pkgconfig module name, regardless of triplet. vcpkg_fixup_pkgconfig merges private properties into the regular properties for ports with static library linkage, so that --static isn't needed. (--static doesn't really work for mixed configurations.)

@nikitalita
Copy link
Contributor Author

IMO this sound quite confusing. At least in vcpkg, there should be one pkgconfig module name, regardless of triplet. vcpkg_fixup_pkgconfig merges private properties into the regular properties for ports with static library linkage, so that --static isn't needed. (--static doesn't really work for mixed configurations.)

To be clear, this is for an upcoming patch to ffmpeg to add in shaderc support; If we're building ffmpeg dynamically (and since shaderc is only built statically), it fails to find the library with pkgconfig due to it not being named shaderc.

One solution is that I can just remove the shaderc_static package config, I was only keeping that in the off chance of breaking something.

Co-authored-by: Kai Pastor <dg0yt@darc.de>
@nikitalita nikitalita force-pushed the fix-shaderc-pkgconfig branch from 5dd2345 to b60d8f2 Compare December 20, 2025 18:43
@nikitalita nikitalita force-pushed the fix-shaderc-pkgconfig branch from 9d396fd to 2223ca2 Compare December 20, 2025 19:27
@BillyONeal
Copy link
Member

One solution is that I can just remove the shaderc_static package config, I was only keeping that in the off chance of breaking something.

I think @dg0yt 's observation is exactly that there shouldn't be a _static .pc.

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the nitpick :/

Thanks!

)

vcpkg_cmake_install()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
if(NOT VCPKG_BUILD_TYPE)

@BillyONeal BillyONeal marked this pull request as draft December 23, 2025 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants