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
Seems that when FetchContent_Declare is defined for SDL2 FIRST, then MixerX was Declared, MixerX tries to install SDL2 no matter what.
Error is
CMake Error: The INTERFACE_SDL2_SHARED property of "SDL2" does
not agree with the value of SDL2_SHARED already determined
for "sdl2_vulkan".
CMake Error: install(EXPORT "SDL2MixerExtStaticTargets" ...) includes target "SDL2_mixer_ext_Static" which requires target "SDL2" that is not in any export set.
I'd suggest check for SDL2_DISABLE_INSTALL is enabled or not to prevent double install.
The text was updated successfully, but these errors were encountered:
Actually, I never used the FetchContent way, and I more prefer the ExternalProject as it gives me a full control on what to configure and how to install, and what content is to take. You may want to check out this example on how to use the MixerX and dependent libraries from the AudioCodec set: https://github.com/TheXTech/TheXTech/blob/main/cmake/library_SDLMixerX.cmake
(Note: In this example, AudioCodecs and MixerX are submodules of the project, and they gets used by local way, i.e. reuse the same source directory without the clonning/updating the whole repo - this results a time waste while debugging because it also tries to sync the repo and rebuild the library when it's not needed).
As I remember, by default build it attempts to find the nearest available in-system SDL2, and it does downloading and installing of extra things if enable the separate AudioCodecs downloading 🤔
Here is also a flag that tells to use system SDL2 in any way, and therefore SDL2 from AudioCodecs will not being used and system-wide will be preferred.
Seems that if SDL is being add_subdirectory'd into project, you can't install any target that depends into SDL, because SDL isn't itself scheduled to be installed by the project
If you then add_subdirectory MixerX, it tries to install itself (which depends on SDL), which breaks
Seems that when FetchContent_Declare is defined for SDL2 FIRST, then MixerX was Declared, MixerX tries to install SDL2 no matter what.
Error is
I'd suggest check for SDL2_DISABLE_INSTALL is enabled or not to prevent double install.
The text was updated successfully, but these errors were encountered: