FindSDL2.cmake
Go to the documentation of this file.
1 #[==[
2 Provides the following variables:
3 
4  * `SDL2_FOUND`: Whether SDL2 was found or not.
5  * `SDL2::SDL2`: A target to use with `target_link_libraries`.
6 #]==]
7 
8 if (EMSCRIPTEN)
9  # Create imported target SDL2::SDL2
10  if (NOT TARGET SDL2::SDL2)
11  add_library(SDL2::SDL2 INTERFACE IMPORTED)
12  set_target_properties(SDL2::SDL2 PROPERTIES
13  INTERFACE_COMPILE_OPTIONS "SHELL:-s USE_SDL=2"
14  INTERFACE_LINK_OPTIONS "SHELL:-s USE_SDL=2"
15  )
16  endif()
17  set(SDL2_FOUND TRUE)
18  return()
19 endif()
20 
21 set(_FindSDL2_args)
22 if (SDL2_FIND_PACKAGE_QUIETLY)
23  list(APPEND _FindSDL2_args QUIET)
24 endif ()
25 if (SDL2_FIND_PACKAGE_REQUIRED)
26  list(APPEND _FindSDL2_args REQUIRED)
27 endif ()
28 
29 # More argument forwarding if `find_package(SDL2)` supports components (mixer, ttf, etc.).
30 find_package(SDL2 CONFIG ${_FindSDL2_args})
31 unset(_FindSDL2_args)
boost::graph_traits< vtkGraph *>::vertex_descriptor target(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)