Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake SDL Fix #559

Merged
merged 3 commits into from
Oct 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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