mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00

Though these are broken and error prone, as they ignore the possibility of conflicts between SDL, SDL2 and wrappers thereof discarding useful include path prefix (SDL2/), since SDL and satellite libraries follow these it's too hard to stay away. So don't use prefixes for SDL include paths any longer.
19 lines
436 B
CMake
19 lines
436 B
CMake
# - Try to locate SDL2
|
|
# This module defines:
|
|
#
|
|
# SDL2_INCLUDE_DIR
|
|
# SDL2_LIBRARY
|
|
# SDL2_FOUND
|
|
#
|
|
|
|
FIND_PATH(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL2)
|
|
|
|
FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2)
|
|
FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2main)
|
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_INCLUDE_DIR SDL2_LIBRARY)
|
|
|
|
MARK_AS_ADVANCED(SDL2_INCLUDE_DIR SDL2_LIBRARY SDL2MAIN_LIBRARY)
|