view cmake/packages/FindSDL2.cmake @ 12:0c62e0af6af7

Client: add JavaScript bindings for Color, #445
author David Demelier <markand@malikania.fr>
date Fri, 01 Apr 2016 13:45:45 +0200
parents 8991989c4708
children a1e80d991968
line wrap: on
line source

# FindSDL2
# --------
#
# Find SDL2 library, this modules defines:
#
# SDL2_INCLUDE_DIRS, where to find SDL.h
# SDL2_LIBRARIES, where to find library
# SDL2_FOUND, if it is found

find_path(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL2)
find_library(SDL2_LIBRARY NAMES libSDL2 SDL2)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
	SDL2
	FOUND_VAR SDL2_FOUND
	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)