diff options
Diffstat (limited to 'src/contrib/SDL-2.30.2/SDL2Config.cmake.in')
-rw-r--r-- | src/contrib/SDL-2.30.2/SDL2Config.cmake.in | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/contrib/SDL-2.30.2/SDL2Config.cmake.in b/src/contrib/SDL-2.30.2/SDL2Config.cmake.in new file mode 100644 index 0000000..cc8bcf2 --- /dev/null +++ b/src/contrib/SDL-2.30.2/SDL2Config.cmake.in | |||
@@ -0,0 +1,77 @@ | |||
1 | # sdl2 cmake project-config input for CMakeLists.txt script | ||
2 | |||
3 | include(FeatureSummary) | ||
4 | set_package_properties(SDL2 PROPERTIES | ||
5 | URL "https://www.libsdl.org/" | ||
6 | DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware" | ||
7 | ) | ||
8 | |||
9 | @PACKAGE_INIT@ | ||
10 | |||
11 | set(SDL2_FOUND TRUE) | ||
12 | |||
13 | if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake") | ||
14 | include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake") | ||
15 | set(SDL2_SDL2_FOUND TRUE) | ||
16 | endif() | ||
17 | if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake") | ||
18 | if(ANDROID) | ||
19 | enable_language(CXX) | ||
20 | endif() | ||
21 | include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake") | ||
22 | set(SDL2_SDL2-static_FOUND TRUE) | ||
23 | endif() | ||
24 | if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake") | ||
25 | include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake") | ||
26 | set(SDL2_SDL2main_FOUND TRUE) | ||
27 | endif() | ||
28 | if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake") | ||
29 | include("${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake") | ||
30 | set(SDL2_SDL2test_FOUND TRUE) | ||
31 | endif() | ||
32 | |||
33 | |||
34 | include("${CMAKE_CURRENT_LIST_DIR}/sdlfind.cmake") | ||
35 | |||
36 | set(SDL_ALSA @SDL_ALSA@) | ||
37 | set(SDL_ALSA_SHARED @SDL_ALSA_SHARED@) | ||
38 | if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static) | ||
39 | sdlFindALSA() | ||
40 | endif() | ||
41 | unset(SDL_ALSA) | ||
42 | unset(SDL_ALSA_SHARED) | ||
43 | |||
44 | |||
45 | check_required_components(SDL2) | ||
46 | |||
47 | # Create SDL2::SDL2 alias for static-only builds | ||
48 | if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2) | ||
49 | if(CMAKE_VERSION VERSION_LESS "3.18") | ||
50 | # FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global. | ||
51 | add_library(SDL2::SDL2 INTERFACE IMPORTED) | ||
52 | set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static") | ||
53 | else() | ||
54 | add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static) | ||
55 | endif() | ||
56 | endif() | ||
57 | |||
58 | # For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables. | ||
59 | |||
60 | set(SDL2_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@") | ||
61 | set(SDL2_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@") | ||
62 | set(SDL2_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2") | ||
63 | set(SDL2_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2") | ||
64 | set(SDL2_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@") | ||
65 | set(SDL2_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@") | ||
66 | set(SDL2_LIBRARIES SDL2::SDL2) | ||
67 | set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static) | ||
68 | set(SDL2_STATIC_PRIVATE_LIBS) | ||
69 | |||
70 | set(SDL2MAIN_LIBRARY) | ||
71 | if(TARGET SDL2::SDL2main) | ||
72 | set(SDL2MAIN_LIBRARY SDL2::SDL2main) | ||
73 | list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main) | ||
74 | list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main) | ||
75 | endif() | ||
76 | |||
77 | set(SDL2TEST_LIBRARY SDL2::SDL2test) | ||