Skip to content

SDL_image cmake doesn't use includes from SDL3_DIR #530

Open
@maia-s

Description

@maia-s

I'm on macos and have SDL3 version 3.2.4 installed via brew. SDL_image 3.2.2 requires SDL 3.2.6, so configuring SDL_image without setting anything else fails at cmake configuration time, as expected.

If I build and do a temporary local install of SDL 3.2.6 and pass its cmake configuration dir to SDL_image via the SDL3_DIR cmake variable, cmake configuration succeeds, but then compilation fails later on:

make: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
  /Users/maia/Dev/sdl3-sys/sdl3-image-src/SDL_image/src/IMG_bmp.c:429:38: error: use of undeclared identifier 'SDL_PROP_SURFACE_HOTSPOT_X_NUMBER'
    429 |         SDL_SetNumberProperty(props, SDL_PROP_SURFACE_HOTSPOT_X_NUMBER, nHotX);
        |                                      ^
  /Users/maia/Dev/sdl3-sys/sdl3-image-src/SDL_image/src/IMG_bmp.c:430:38: error: use of undeclared identifier 'SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER'
    430 |         SDL_SetNumberProperty(props, SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER, nHotY);
        |                                      ^
  2 errors generated.
  make[2]: *** [CMakeFiles/SDL3_image-shared.dir/src/IMG_bmp.c.o] Error 1
  make[1]: *** [CMakeFiles/SDL3_image-shared.dir/all] Error 2
  make: *** [all] Error 2

It appears SDL_image is using the headers from the brew install instead of the headers set via SDL3_DIR.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions