Skip to content

Fix for name mismatched cmake warning.#3

Open
sleepyspider1 wants to merge 1 commit into
aminosbh:masterfrom
sleepyspider1:master
Open

Fix for name mismatched cmake warning.#3
sleepyspider1 wants to merge 1 commit into
aminosbh:masterfrom
sleepyspider1:master

Conversation

@sleepyspider1

Copy link
Copy Markdown

No description provided.

@mrexodia

Copy link
Copy Markdown

Would be nice if this could be merged!

@davide99

Copy link
Copy Markdown

Thank you

@glebm

glebm commented Apr 11, 2021

Copy link
Copy Markdown

NAME_MISMATCHED requires CMake 3.17+

For compatibility with older versions, it'd be better to do something like this instead:

if(SDL2MAIN_LIBRARY)
  if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.17.0")
    FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2main
                                      REQUIRED_VARS SDL2MAIN_LIBRARY SDL2_INCLUDE_DIR
                                      VERSION_VAR SDL2_VERSION_STRING
                                      NAME_MISMATCHED)
  else()
    FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2main
                                      REQUIRED_VARS SDL2MAIN_LIBRARY SDL2_INCLUDE_DIR
                                      VERSION_VAR SDL2_VERSION_STRING)
  endif()
endif()

glebm added a commit to glebm/devilutionX that referenced this pull request Apr 11, 2021
AtkinsSJ added a commit to AtkinsSJ/yak-2 that referenced this pull request Feb 14, 2022
I went on a wild goose chase trying to get cmake to properly link with
SDL_ttf, and in the end, deleting the build directory fixed it. But,
these cmake files seem good so I'll keep them. They came from [here]
(https://github.com/aminosbh/sdl2-cmake-modules) with some tweaks from
[this PR](aminosbh/sdl2-cmake-modules#3).
iplanetcn pushed a commit to iplanetcn/sdl2-cmake-modules that referenced this pull request Jun 12, 2023
…mpatibility

Config mode and sdl compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants