this repo has no description
1# - Find SDL
2# Find the SDL libraries (asound)
3#
4# This module defines the following variables:
5# SDL_FOUND - True if SDL_INCLUDE_DIR & SDL_LIBRARY are found
6# SDL_LIBRARY - Set when SDL_LIBRARY is found
7#
8# SDL_INCLUDE_DIR - where to find SDL.h, etc.
9#
10
11#=============================================================================
12# Copyright Eric Wing
13#
14# Distributed under the OSI-approved BSD License (the "License");
15# see accompanying file Copyright.txt for details.
16#
17# This software is distributed WITHOUT ANY WARRANTY; without even the
18# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19# See the License for more information.
20#=============================================================================
21# (To distribute this file outside of CMake, substitute the full
22# License text for the above reference.)
23
24find_path(SDL2_INCLUDE_DIR NAMES SDL.h
25 PATH_SUFFIXES include/SDL2 include
26 DOC "The SDL include directory"
27)
28
29find_library(SDL2_LIBRARY NAMES SDL2 sdl2 sdl2 sdl-2.0
30 DOC "The SDL library"
31)
32
33if(WIN32)
34 find_library(SDL2MAIN_LIBRARY NAMES SDL2main sdl2main
35 DOC "The SDLmain library needed on some platforms when builing an application (opposed to a library)"
36)
37else()
38 set(SDL2MAIN_LIBRARY "")
39endif()
40
41
42# handle the QUIETLY and REQUIRED arguments and set SDL_FOUND to TRUE if
43# all listed variables are TRUE
44include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
45
46FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
47 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR
48 VERSION_VAR SDL2_VERSION_STRING)
49
50#mark_as_advanced(SDL_INCLUDE_DIR SDL_LIBRARIES)
51
52