-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathSDL3_soundConfig.cmake.in
More file actions
42 lines (34 loc) · 1.43 KB
/
SDL3_soundConfig.cmake.in
File metadata and controls
42 lines (34 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# sdl3_sound cmake project-config input
@PACKAGE_INIT@
include(FeatureSummary)
set_package_properties(SDL3_sound PROPERTIES
URL "https://github.com/icculus/SDL_sound/"
DESCRIPTION " An abstract soundfile decoder"
)
set(SDL3_sound_FOUND ON)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3_sound-shared-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL3_sound-shared-targets.cmake")
set(SDL3_sound_SDL3_sound_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3_sound-static-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL3_sound-static-targets.cmake")
set(SDL3_sound_SDL3_sound-static_FOUND TRUE)
endif()
check_required_components(SDL3_sound)
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
if(CMAKE_VERSION VERSION_LESS "3.18")
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
add_library(${NEW_TARGET} INTERFACE IMPORTED)
set_target_properties(${NEW_TARGET} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET}")
else()
add_library(${NEW_TARGET} ALIAS ${TARGET})
endif()
endfunction()
# Make sure SDL3_sound::SDL3_sound always exists
if(NOT TARGET SDL3_sound::SDL3_sound)
if(TARGET SDL3_sound::SDL3_sound-shared)
_sdl_create_target_alias_compat(SDL3_sound::SDL3_sound SDL3_sound::SDL3_sound-shared)
elseif(TARGET SDL3_sound::SDL3_sound-static)
_sdl_create_target_alias_compat(SDL3_sound::SDL3_sound SDL3_sound::SDL3_sound-static)
endif()
endif()