Enabled sfml-audio on iOS
This commit is contained in:
parent
f17ea5872b
commit
6ab8d43b04
@ -31,8 +31,13 @@
|
|||||||
#include <SFML/Config.hpp>
|
#include <SFML/Config.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <al.h>
|
#ifdef SFML_SYSTEM_IOS
|
||||||
#include <alc.h>
|
#include <OpenAl/al.h>
|
||||||
|
#include <OpenAl/alc.h>
|
||||||
|
#else
|
||||||
|
#include <al.h>
|
||||||
|
#include <alc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
|
@ -67,7 +67,9 @@ endif()
|
|||||||
|
|
||||||
# find external libraries
|
# find external libraries
|
||||||
if(NOT SFML_OS_ANDROID)
|
if(NOT SFML_OS_ANDROID)
|
||||||
find_package(OpenAL REQUIRED)
|
if(NOT SFML_OS_IOS)
|
||||||
|
find_package(OpenAL REQUIRED)
|
||||||
|
endif()
|
||||||
find_package(Vorbis REQUIRED)
|
find_package(Vorbis REQUIRED)
|
||||||
find_package(FLAC REQUIRED)
|
find_package(FLAC REQUIRED)
|
||||||
else()
|
else()
|
||||||
@ -75,17 +77,25 @@ else()
|
|||||||
find_host_package(Vorbis REQUIRED)
|
find_host_package(Vorbis REQUIRED)
|
||||||
find_host_package(FLAC REQUIRED)
|
find_host_package(FLAC REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
include_directories(${OPENAL_INCLUDE_DIR})
|
|
||||||
|
if(NOT SFML_OS_IOS)
|
||||||
|
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
|
||||||
add_definitions(-DFLAC__NO_DLL)
|
add_definitions(-DFLAC__NO_DLL)
|
||||||
|
|
||||||
# build the list of external libraries to link
|
# build the list of external libraries to link
|
||||||
|
if(SFML_OS_IOS)
|
||||||
|
list(APPEND AUDIO_EXT_LIBS "-framework OpenAL")
|
||||||
|
else()
|
||||||
|
list(APPEND AUDIO_EXT_LIBS ${OPENAL_LIBRARY})
|
||||||
|
endif()
|
||||||
if(SFML_OS_ANDROID)
|
if(SFML_OS_ANDROID)
|
||||||
list(APPEND AUDIO_EXT_LIBS android OpenSLES)
|
list(APPEND AUDIO_EXT_LIBS android OpenSLES)
|
||||||
endif()
|
endif()
|
||||||
list(APPEND AUDIO_EXT_LIBS ${OPENAL_LIBRARY} ${VORBIS_LIBRARIES} ${FLAC_LIBRARY})
|
list(APPEND AUDIO_EXT_LIBS ${VORBIS_LIBRARIES} ${FLAC_LIBRARY})
|
||||||
|
|
||||||
# define the sfml-audio target
|
# define the sfml-audio target
|
||||||
sfml_add_library(sfml-audio
|
sfml_add_library(sfml-audio
|
||||||
|
@ -48,6 +48,4 @@ endif()
|
|||||||
add_subdirectory(Window)
|
add_subdirectory(Window)
|
||||||
add_subdirectory(Network)
|
add_subdirectory(Network)
|
||||||
add_subdirectory(Graphics)
|
add_subdirectory(Graphics)
|
||||||
if(NOT SFML_OS_IOS)
|
add_subdirectory(Audio)
|
||||||
add_subdirectory(Audio)
|
|
||||||
endif()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user