mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in
|
|
index ef96827..864b32e 100644
|
|
--- a/cmake/SFMLConfigDependencies.cmake.in
|
|
+++ b/cmake/SFMLConfigDependencies.cmake.in
|
|
@@ -75,6 +75,8 @@ if(SFML_STATIC_LIBRARIES)
|
|
# sfml-audio
|
|
list(FIND SFML_FIND_COMPONENTS "audio" FIND_SFML_AUDIO_COMPONENT_INDEX)
|
|
if(FIND_SFML_AUDIO_COMPONENT_INDEX GREATER -1)
|
|
+ find_dependency(OpenAL)
|
|
+ set(OpenAL_LIB OpenAL::OpenAL)
|
|
sfml_bind_dependency(TARGET OpenAL FRIENDLY_NAME "OpenAL" SEARCH_NAMES "OpenAL" "openal" "openal32")
|
|
if (NOT FIND_SFML_OS_IOS)
|
|
sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "VorbisFile" SEARCH_NAMES "vorbisfile")
|
|
diff --git a/src/SFML/Audio/CMakeLists.txt b/src/SFML/Audio/CMakeLists.txt
|
|
index 8158365..3ebaf90 100644
|
|
--- a/src/SFML/Audio/CMakeLists.txt
|
|
+++ b/src/SFML/Audio/CMakeLists.txt
|
|
@@ -68,7 +68,9 @@ elseif(SFML_OS_ANDROID)
|
|
endif()
|
|
|
|
# find external libraries
|
|
-find_package(OpenAL REQUIRED)
|
|
+find_package(OpenAL CONFIG REQUIRED)
|
|
+set(OpenAL_LIB OpenAL::OpenAL)
|
|
+sfml_find_package(OpenAL LINK OpenAL_LIB)
|
|
sfml_find_package(VORBIS INCLUDE "VORBIS_INCLUDE_DIRS" LINK "VORBIS_LIBRARIES")
|
|
sfml_find_package(FLAC INCLUDE "FLAC_INCLUDE_DIR" LINK "FLAC_LIBRARY")
|
|
|