view cmake/FindSDL2.cmake @ 634:005794d9cf77

json_util: cleanups - Make overloads that takes a string as a key, - make header only code, - Remove contains function, use std::count or std::find instead.
author David Demelier <markand@malikania.fr>
date Fri, 23 Mar 2018 12:56:47 +0100
parents 01e01777ff50
children 5bd9424a523a
line wrap: on
line source

# FindSDL2
# --------
#
# Find SDL2 library, this modules defines:
#
#  SDL2_LIBRARY, the name of the library to link against
#  SDL2_FOUND, if false, do not try to link to SDL
#  SDL2_INCLUDE_DIR, where to find SDL.h

find_path(
    SDL2_INCLUDE_DIR
    NAMES SDL.h
    PATH_SUFFIXES include/SDL2 include
)

find_library(SDL2_LIBRARY NAMES SDL2 SDL2-2.0 libSDL2 libSDL2-2.0)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
    SDL2
    REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR
)

set(SDL2_LIBRARIES ${SDL2_LIBRARY})
set(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})

mark_as_advanced(SDL2_INCLUDE_DIR SDL2_LIBRARY)