Skip to content

Failed to build SDL_image if it is a submodule under a parent module #552

Open
@wyatt-wong

Description

@wyatt-wong

I performed a few more testings and come up with the following:

If SDL_image is at the top level and you run cmake and make then the build will be successful. A top level structure looks like this:

/
⎣SDL_image

If SDL_image is a submodule under a parent module and you run cmake in the parent module, when you run make in the parent module which build the source of both parent module and submodule, then the build will fail in SDL_image with missing <avif/avif.h> error. The submodule structure looks like this:

/
⎣ some_folder
   ⎣SDL_image

A temporary workaround is to copy avif/* and webp/* to the SDL_image/include folder before running make. That means:

cp -pr ~/some_folder/SDL_image/VisualC/external/include/avif/ ~/some_folder/SDL_image/include
cp -pr ~/some_folder/SDL_image/VisualC/external/include/webp/ ~/some_folder/SDL_image/include
make

Metadata

Metadata

Assignees

No one assigned

    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