summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-2.30.2/SDL2Config.cmake.in
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-05-04 16:51:29 -0700
committer3gg <3gg@shellblade.net>2024-05-04 16:51:29 -0700
commit8222bfe56d4dabe8d92fc4b25ea1b0163b16f3e1 (patch)
tree763389e42276035ac134d94eb1dc32293b88d807 /src/contrib/SDL-2.30.2/SDL2Config.cmake.in
Initial commit.
Diffstat (limited to 'src/contrib/SDL-2.30.2/SDL2Config.cmake.in')
-rw-r--r--src/contrib/SDL-2.30.2/SDL2Config.cmake.in77
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
3include(FeatureSummary)
4set_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
11set(SDL2_FOUND TRUE)
12
13if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
14 include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
15 set(SDL2_SDL2_FOUND TRUE)
16endif()
17if(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)
23endif()
24if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
25 include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
26 set(SDL2_SDL2main_FOUND TRUE)
27endif()
28if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
29 include("${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
30 set(SDL2_SDL2test_FOUND TRUE)
31endif()
32
33
34include("${CMAKE_CURRENT_LIST_DIR}/sdlfind.cmake")
35
36set(SDL_ALSA @SDL_ALSA@)
37set(SDL_ALSA_SHARED @SDL_ALSA_SHARED@)
38if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static)
39 sdlFindALSA()
40endif()
41unset(SDL_ALSA)
42unset(SDL_ALSA_SHARED)
43
44
45check_required_components(SDL2)
46
47# Create SDL2::SDL2 alias for static-only builds
48if(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()
56endif()
57
58# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
59
60set(SDL2_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
61set(SDL2_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
62set(SDL2_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
63set(SDL2_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
64set(SDL2_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
65set(SDL2_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
66set(SDL2_LIBRARIES SDL2::SDL2)
67set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
68set(SDL2_STATIC_PRIVATE_LIBS)
69
70set(SDL2MAIN_LIBRARY)
71if(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)
75endif()
76
77set(SDL2TEST_LIBRARY SDL2::SDL2test)