From 3fbfde39a5aa167f9cd606b85ad0118411831a96 Mon Sep 17 00:00:00 2001 From: Jonathan De Wachter Date: Tue, 7 Oct 2014 09:35:46 +0200 Subject: [PATCH] Adjusted the new audio backends to compile on Linux --- cmake/Modules/FindFLAC.cmake | 5 +++-- cmake/Modules/FindVorbis.cmake | 5 +++-- extlibs/headers/{flac => FLAC}/all.h | 0 extlibs/headers/{flac => FLAC}/assert.h | 0 extlibs/headers/{flac => FLAC}/callback.h | 0 extlibs/headers/{flac => FLAC}/export.h | 0 extlibs/headers/{flac => FLAC}/format.h | 0 extlibs/headers/{flac => FLAC}/metadata.h | 0 extlibs/headers/{flac => FLAC}/ordinals.h | 0 extlibs/headers/{flac => FLAC}/stream_decoder.h | 0 extlibs/headers/{flac => FLAC}/stream_encoder.h | 0 include/SFML/System/FileInputStream.hpp | 3 ++- include/SFML/System/MemoryInputStream.hpp | 3 ++- src/SFML/Audio/SoundFileReaderFlac.hpp | 2 +- src/SFML/Audio/SoundFileWriterFlac.hpp | 2 +- 15 files changed, 12 insertions(+), 8 deletions(-) rename extlibs/headers/{flac => FLAC}/all.h (100%) rename extlibs/headers/{flac => FLAC}/assert.h (100%) rename extlibs/headers/{flac => FLAC}/callback.h (100%) rename extlibs/headers/{flac => FLAC}/export.h (100%) rename extlibs/headers/{flac => FLAC}/format.h (100%) rename extlibs/headers/{flac => FLAC}/metadata.h (100%) rename extlibs/headers/{flac => FLAC}/ordinals.h (100%) rename extlibs/headers/{flac => FLAC}/stream_decoder.h (100%) rename extlibs/headers/{flac => FLAC}/stream_encoder.h (100%) diff --git a/cmake/Modules/FindFLAC.cmake b/cmake/Modules/FindFLAC.cmake index 59aa8429..e139e62f 100644 --- a/cmake/Modules/FindFLAC.cmake +++ b/cmake/Modules/FindFLAC.cmake @@ -7,9 +7,10 @@ # FLAC_LIBRARY # -find_path(FLAC_INCLUDE_DIR flac/stream_decoder.h) +find_path(FLAC_INCLUDE_DIR FLAC/all.h) +find_path(FLAC_INCLUDE_DIR FLAC/stream_decoder.h) -find_library(FLAC_LIBRARY NAMES flac) +find_library(FLAC_LIBRARY NAMES FLAC) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(FLAC DEFAULT_MSG FLAC_LIBRARY FLAC_INCLUDE_DIR) diff --git a/cmake/Modules/FindVorbis.cmake b/cmake/Modules/FindVorbis.cmake index 9185d857..73190b1d 100644 --- a/cmake/Modules/FindVorbis.cmake +++ b/cmake/Modules/FindVorbis.cmake @@ -13,9 +13,10 @@ find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) find_library(OGG_LIBRARY NAMES ogg) find_library(VORBIS_LIBRARY NAMES vorbis) find_library(VORBISFILE_LIBRARY NAMES vorbisfile) +find_library(VORBISENC_LIBRARY NAMES vorbisenc) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(VORBIS DEFAULT_MSG VORBIS_LIBRARY VORBISFILE_LIBRARY OGG_LIBRARY VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR) +find_package_handle_standard_args(VORBIS DEFAULT_MSG VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY OGG_LIBRARY VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR) set(VORBIS_INCLUDE_DIRS ${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR}) -set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) +set(VORBIS_LIBRARIES ${VORBISENC_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) diff --git a/extlibs/headers/flac/all.h b/extlibs/headers/FLAC/all.h similarity index 100% rename from extlibs/headers/flac/all.h rename to extlibs/headers/FLAC/all.h diff --git a/extlibs/headers/flac/assert.h b/extlibs/headers/FLAC/assert.h similarity index 100% rename from extlibs/headers/flac/assert.h rename to extlibs/headers/FLAC/assert.h diff --git a/extlibs/headers/flac/callback.h b/extlibs/headers/FLAC/callback.h similarity index 100% rename from extlibs/headers/flac/callback.h rename to extlibs/headers/FLAC/callback.h diff --git a/extlibs/headers/flac/export.h b/extlibs/headers/FLAC/export.h similarity index 100% rename from extlibs/headers/flac/export.h rename to extlibs/headers/FLAC/export.h diff --git a/extlibs/headers/flac/format.h b/extlibs/headers/FLAC/format.h similarity index 100% rename from extlibs/headers/flac/format.h rename to extlibs/headers/FLAC/format.h diff --git a/extlibs/headers/flac/metadata.h b/extlibs/headers/FLAC/metadata.h similarity index 100% rename from extlibs/headers/flac/metadata.h rename to extlibs/headers/FLAC/metadata.h diff --git a/extlibs/headers/flac/ordinals.h b/extlibs/headers/FLAC/ordinals.h similarity index 100% rename from extlibs/headers/flac/ordinals.h rename to extlibs/headers/FLAC/ordinals.h diff --git a/extlibs/headers/flac/stream_decoder.h b/extlibs/headers/FLAC/stream_decoder.h similarity index 100% rename from extlibs/headers/flac/stream_decoder.h rename to extlibs/headers/FLAC/stream_decoder.h diff --git a/extlibs/headers/flac/stream_encoder.h b/extlibs/headers/FLAC/stream_encoder.h similarity index 100% rename from extlibs/headers/flac/stream_encoder.h rename to extlibs/headers/FLAC/stream_encoder.h diff --git a/include/SFML/System/FileInputStream.hpp b/include/SFML/System/FileInputStream.hpp index d123a509..1e329415 100644 --- a/include/SFML/System/FileInputStream.hpp +++ b/include/SFML/System/FileInputStream.hpp @@ -30,6 +30,7 @@ //////////////////////////////////////////////////////////// #include #include +#include #include @@ -39,7 +40,7 @@ namespace sf /// \brief Implementation of input stream based on a file /// //////////////////////////////////////////////////////////// -class FileInputStream : public InputStream +class SFML_SYSTEM_API FileInputStream : public InputStream { public : diff --git a/include/SFML/System/MemoryInputStream.hpp b/include/SFML/System/MemoryInputStream.hpp index ccb0f448..4ce54d60 100644 --- a/include/SFML/System/MemoryInputStream.hpp +++ b/include/SFML/System/MemoryInputStream.hpp @@ -30,6 +30,7 @@ //////////////////////////////////////////////////////////// #include #include +#include #include @@ -39,7 +40,7 @@ namespace sf /// \brief Implementation of input stream based on a memory chunk /// //////////////////////////////////////////////////////////// -class MemoryInputStream : public InputStream +class SFML_SYSTEM_API MemoryInputStream : public InputStream { public : diff --git a/src/SFML/Audio/SoundFileReaderFlac.hpp b/src/SFML/Audio/SoundFileReaderFlac.hpp index cb7ccf2e..e96b7b1c 100644 --- a/src/SFML/Audio/SoundFileReaderFlac.hpp +++ b/src/SFML/Audio/SoundFileReaderFlac.hpp @@ -29,7 +29,7 @@ // Headers //////////////////////////////////////////////////////////// #include -#include +#include #include #include diff --git a/src/SFML/Audio/SoundFileWriterFlac.hpp b/src/SFML/Audio/SoundFileWriterFlac.hpp index 228ca49e..3eaf835f 100644 --- a/src/SFML/Audio/SoundFileWriterFlac.hpp +++ b/src/SFML/Audio/SoundFileWriterFlac.hpp @@ -29,7 +29,7 @@ // Headers //////////////////////////////////////////////////////////// #include -#include +#include #include