You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vcpkg.json manifest needs a new field to specify whether a port conflicts with another port and cannot be built alongside it or vice versa.
Please review the discussion in #44023 to see why this issue arose.
To summarise, SDL3 is superseding SDL2. The team behind SDL has thus provided a drop-in replacement for SDL2 legacy applications, which uses SDL3 behind the scenes to make migration easier. As SDL2-compat is meant as a drop-in replacement for SDL2, its CMakeLists.txt places header files with the same name in the same directories and defines the library with the same name (SDL2::SDL2) as SDL2 does. Thus, the ports sdl2 and sdl2-compat can't be built next to each other.
One suggestion by @Cheney-W to achieve mutual exclusivity was to modify the portfiles of both ports to detect whether the other was also built, as has been done for other conflicting ports. But as @dg0yt pointed out in his comment this won't work in all cases.
I would thus like to suggest adding a new field, i.e. conflicts, to the vcpkg.json-manifest. It could look like the following:
This way, a port can specify that it conflicts with another port, preventing conflicting ports from being built next to each other.
What do you think about this? Is this a valid approach for vcpkg or am I missing something?
If this approach is feasible, I would volunteer to try implementing this new feature and opening a pull request for vcpkg-tool when I'm done.
Looking forward to your feedback. 🙂
The text was updated successfully, but these errors were encountered:
The vcpkg.json manifest needs a new field to specify whether a port conflicts with another port and cannot be built alongside it or vice versa.
Please review the discussion in #44023 to see why this issue arose.
To summarise, SDL3 is superseding SDL2. The team behind SDL has thus provided a drop-in replacement for SDL2 legacy applications, which uses SDL3 behind the scenes to make migration easier. As SDL2-compat is meant as a drop-in replacement for SDL2, its CMakeLists.txt places header files with the same name in the same directories and defines the library with the same name (SDL2::SDL2) as SDL2 does. Thus, the ports sdl2 and sdl2-compat can't be built next to each other.
One suggestion by @Cheney-W to achieve mutual exclusivity was to modify the portfiles of both ports to detect whether the other was also built, as has been done for other conflicting ports. But as @dg0yt pointed out in his comment this won't work in all cases.
I would thus like to suggest adding a new field, i.e.
conflicts
, to thevcpkg.json
-manifest. It could look like the following:This way, a port can specify that it conflicts with another port, preventing conflicting ports from being built next to each other.
What do you think about this? Is this a valid approach for vcpkg or am I missing something?
If this approach is feasible, I would volunteer to try implementing this new feature and opening a pull request for
vcpkg-tool
when I'm done.Looking forward to your feedback. 🙂
The text was updated successfully, but these errors were encountered: