Skip to content

Commit

Permalink
fix: CMake SDL warning (AntiMicroX#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-TU authored Oct 11, 2022
1 parent a2dc31c commit 3b79f88
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cmake/modules/FindSDL2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,15 @@ endif()

include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR
VERSION_VAR SDL2_VERSION_STRING)
set(SDL2_REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)

if(SDL2MAIN_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2main
REQUIRED_VARS SDL2MAIN_LIBRARY SDL2_INCLUDE_DIR
VERSION_VAR SDL2_VERSION_STRING)
list(APPEND SDL2_REQUIRED_VARS SDL2MAIN_LIBRARY SDL2_INCLUDE_DIR)
endif()

find_package_handle_standard_args(SDL2
REQUIRED_VARS ${SDL2_REQUIRED_VARS}
VERSION_VAR SDL2_VERSION_STRING)

mark_as_advanced(SDL2_PATH
SDL2_NO_DEFAULT_PATH
Expand Down

0 comments on commit 3b79f88

Please sign in to comment.