Find OpenAL correctly on iOS

This commit is contained in:
Jonny Paton 2018-02-23 17:04:29 -08:00 committed by eXpl0it3r
parent 910458cfb3
commit f963faa694
2 changed files with 4 additions and 13 deletions

View File

@ -29,14 +29,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Config.hpp>
#ifdef SFML_SYSTEM_IOS
#include <OpenAl/al.h>
#include <OpenAl/alc.h>
#else
#include <al.h>
#include <alc.h>
#endif
#include <al.h>
#include <alc.h>
namespace sf namespace sf
{ {

View File

@ -67,9 +67,7 @@ endif()
# find external libraries # find external libraries
if(SFML_OS_IOS) if(SFML_OS_IOS)
if(NOT SFML_OS_IOS) find_host_package(OpenAL REQUIRED)
find_host_package(OpenAL REQUIRED)
endif()
find_host_package(Vorbis REQUIRED) find_host_package(Vorbis REQUIRED)
find_host_package(FLAC REQUIRED) find_host_package(FLAC REQUIRED)
else() else()
@ -78,9 +76,7 @@ else()
find_package(FLAC REQUIRED) find_package(FLAC REQUIRED)
endif() endif()
if(NOT SFML_OS_IOS) include_directories(${OPENAL_INCLUDE_DIR})
include_directories(${OPENAL_INCLUDE_DIR})
endif()
include_directories(${VORBIS_INCLUDE_DIRS}) include_directories(${VORBIS_INCLUDE_DIRS})
include_directories(${FLAC_INCLUDE_DIR}) include_directories(${FLAC_INCLUDE_DIR})
add_definitions(-DOV_EXCLUDE_STATIC_CALLBACKS) # avoids warnings in vorbisfile.h add_definitions(-DOV_EXCLUDE_STATIC_CALLBACKS) # avoids warnings in vorbisfile.h