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

[libspng]: New port #35412

Merged
merged 3 commits into from
Dec 1, 2023
Merged

[libspng]: New port #35412

merged 3 commits into from
Dec 1, 2023

Conversation

FantasqueX
Copy link
Contributor

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@FantasqueX FantasqueX marked this pull request as draft November 30, 2023 04:15
@FantasqueX FantasqueX force-pushed the libspng-1 branch 2 times, most recently from 19e3d20 to 73687bd Compare November 30, 2023 04:52
@FantasqueX FantasqueX marked this pull request as ready for review November 30, 2023 05:57
@Cheney-W Cheney-W added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Nov 30, 2023
@Cheney-W
Copy link
Contributor

Usage test failed in x64-windows and x64-windows-static triplet:
1.

CMake Error at vcpkg/installed/x64-windows/share/spng/SPNGConfig.cmake:27 (find_dependency):
  Unknown CMake command "find_dependency".

This issue could be fixed by adding include (CMakeFindDependencyMacro) on the previous line of find_dependency(ZLIB REQUIRED) in https://github.com/randy408/libspng/blob/v0.7.4/cmake/Config.cmake.in

CMake Error at F:\VSProject\main\CMakeLists.txt:28 (target_link_libraries):
  Target "main" links to:
    spng::spng
  but the target was not found.

The issue is that under the x64-windows-static triplet, the generated target name is spng::spng_static instead of spng::spng.
For fixing this issue, please modify the content of usage file as below:

From: target_link_libraries(main PRIVATE spng::spng)
To: target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:spng::spng>,spng::spng,spng::spng_static>) 

@Cheney-W Cheney-W marked this pull request as draft November 30, 2023 07:31
FantasqueX added a commit to FantasqueX/libspng that referenced this pull request Nov 30, 2023
Currently, when use `find_package(SPNG CONFIG REQUIRED)` , an error
occurred.
```
CMake Error at vcpkg/installed/x64-windows/share/spng/SPNGConfig.cmake:27 (find_dependency):
  Unknown CMake command "find_dependency".
```

Reference: microsoft/vcpkg#35412
@FantasqueX
Copy link
Contributor Author

FantasqueX commented Nov 30, 2023

Thanks for your review. I've fixed those issues and opened a PR to upstream randy408/libspng#263

Tested usage on x64-windows

@FantasqueX FantasqueX marked this pull request as ready for review November 30, 2023 16:37
@Cheney-W Cheney-W added the info:reviewed Pull Request changes follow basic guidelines label Dec 1, 2023
@vicroms vicroms merged commit 7bb78b3 into microsoft:master Dec 1, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants