Skip to content

CMake should always test minimum SDL3 version #520

Open
@madebr

Description

@madebr

The SDL3 version is currently not tested when using SDL3 and SDL3_image as git submodules.

The following should be disallowed (because SDL3 is too old):

cmake_minimum_required(VERSION 3.20)
project(mygame C)

add_subdirectory(SDL3-3.1.6 EXCLUDE_FROM_ALL)
add_subdirectory(SDL3_image-3.2.4 EXCLUDE_FROM_ALL)

add_executable(mygame WIN32 main.c)
target_link_libraries(mygame  PRIVATE SDL3_image::SDL3_image SDL3::SDL3)

(this also applies to SDL3_mixer, SDL3_ttf and SDL3_net)

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