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

[sdl3-image] Add new port sdl3-image #42849

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Conversation

shybovycha
Copy link
Contributor

Add SDL3-image port. There already is an SDL3 port, but none for the relevant components (mixer, ttf, image). Used the latest 3.x release tag (preview-3.1.0)

  • 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.

@shybovycha shybovycha marked this pull request as draft December 22, 2024 03:25
@shybovycha shybovycha marked this pull request as ready for review December 22, 2024 03:46
@Mengna-Li Mengna-Li self-assigned this Dec 23, 2024
@Mengna-Li Mengna-Li changed the title Sdl3 image [sdl3-image] Add new port sdl3-image Dec 23, 2024
@Mengna-Li Mengna-Li added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Dec 23, 2024
ports/sdl3-image/portfile.cmake Show resolved Hide resolved
versions/s-/sdl3-image.json Outdated Show resolved Hide resolved
@Mengna-Li
Copy link
Contributor

Note: I will be converting your PR to draft status. When you're ready, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@Mengna-Li Mengna-Li marked this pull request as draft December 23, 2024 08:33
@shybovycha shybovycha requested a review from Mengna-Li December 23, 2024 09:12
@shybovycha shybovycha marked this pull request as ready for review December 23, 2024 09:12
ports/sdl3-image/portfile.cmake Show resolved Hide resolved
ports/sdl3-image/usage Outdated Show resolved Hide resolved
ports/sdl3-image/usage Outdated Show resolved Hide resolved
@Mengna-Li
Copy link
Contributor

@shybovycha
I encountered this issue while testing the usage:

1> [CMake] CMake Error at D:/vcpkg/installed/x64-windows/share/SDL3_image/SDL3_image-shared-targets.cmake:60 (set_target_properties):
1> [CMake]   The link interface of target "SDL3_image::SDL3_image-shared" contains:
1> [CMake] 
1> [CMake]     SDL3::Headers
1> [CMake] 
1> [CMake]   but the target was not found.  Possible reasons include:
1> [CMake] 
1> [CMake]     * There is a typo in the target name.
1> [CMake]     * A find_package call is missing for an IMPORTED target.
1> [CMake]     * An ALIAS target is missing.

@shybovycha
Copy link
Contributor Author

@Mengna-Li i can confirm this happens. apparently, SDL3-image requires SDL3:

if(NOT TARGET SDL3::Headers OR NOT TARGET ${sdl3_target_name})
    find_package(SDL3 ${SDL_REQUIRED_VERSION} REQUIRED COMPONENTS ${sdl_required_components})
endif()

which would require a separate dependency entry in both vcpkg.json and a separate find_package(SDL3 CONFIG REQUIRED) call in CMakeLists.txt. not sure what's the best approach here would be - some addition to the usage file or an implicit patch to the portfile (to add SDL3 and a call to find_package under the hood when SDL3-image is added to a project)?

@Mengna-Li
Copy link
Contributor

(to add SDL3 and a call to find_package under the hood when SDL3-image is added to a project)?

I think this way is better.

@Mengna-Li
Copy link
Contributor

Note: I will be converting your PR to draft status. When you're ready, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@Mengna-Li Mengna-Li marked this pull request as draft January 8, 2025 08:12
@shybovycha
Copy link
Contributor Author

@Mengna-Li i have added the SDL3 dependency to the cmake/SDL3_imageConfig.cmake.in file in SDL3 code so now the explicit dependency on SDL3 is not required

@shybovycha shybovycha marked this pull request as ready for review January 19, 2025 04:26
@Mengna-Li
Copy link
Contributor

Usage tested pass on x64-windows.

@Mengna-Li Mengna-Li added the info:reviewed Pull Request changes follow basic guidelines label Jan 20, 2025
@vicroms vicroms merged commit c7961da into microsoft:master Jan 21, 2025
17 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.

4 participants