-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[package] sdl_image/2.6.3: failed to build with sdl/*:shared=True #22532
Comments
You're correct on the list expansion problem, looking at the relevant code sections, we have the following in the generated CMake file:
and the following in sdl_image's cmake:
(SDL2_INCLUDE_DIR gets set to sdl_INCLUDE_DIRS_RELEASE) I can make a proper PR tomorrow, but this hacky replace-in-file would work if you need an immediate solution:
Not sure why it's fine in static mode though, probably not worth worrying about. |
Hi @StellaSmith thank you for reporting this and @Ahajha for proposing a fix. Indeed this issue only appears when We could patch this, but this expectation is hardcoded in SDL image:
that is, when building sdl image as shared, it expects sdl as shared, and when it building it as static, it expects it as static. Unless there is a specific reason why Otherwise I would suggest reporting this upstream to the SDL image maintainers. |
@jcar87 Good find, I think I agree that this probably should just be an invalid configuration given the CMake in the new versions. Currently we validate the following: if self.options.shared and not self.dependencies["sdl"].options.shared:
raise ConanInvalidConfiguration(f"{self.ref} shared requires sdl shared") But perhaps this was a minor oversight, and it should actually be if self.options.shared != self.dependencies["sdl"].options.shared:
lib_type = "shared" if self.options.shared else "static"
raise ConanInvalidConfiguration(f"{self.ref} {lib_type} requires sdl {lib_type}") |
Description
As per the title, SDL_Image fails to build when using a SDL compiled as a shared library.
The logs seems to suggest that SDL_Image is trying to open SDL's
SDL_version.h
but wrongly uses the include directory list?Package and Environment Details
Conan profile
Profile host:
Profile build:
Steps to reproduce
Logs
Click to expand log
The text was updated successfully, but these errors were encountered: