diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 2e9191e810..6dc9382d03 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -89,7 +89,7 @@ target_link_libraries(openmw ${SOUND_INPUT_LIBRARY} ${BULLET_LIBRARIES} ${MYGUI_LIBRARIES} - MyGUI.OgrePlatform #TODO MyGUI ogre platform is not added by the find script + ${MYGUI_PLATFORM_LIBRARIES} components ) diff --git a/apps/openmw/mwgui/messagebox.hpp b/apps/openmw/mwgui/messagebox.hpp index bf3307accf..33155b2a00 100644 --- a/apps/openmw/mwgui/messagebox.hpp +++ b/apps/openmw/mwgui/messagebox.hpp @@ -7,6 +7,7 @@ #include "window_base.hpp" #include "window_manager.hpp" +#undef MessageBox namespace MWGui { diff --git a/apps/openmw/mwgui/widgets.hpp b/apps/openmw/mwgui/widgets.hpp index 4d31ad5219..a7916285eb 100644 --- a/apps/openmw/mwgui/widgets.hpp +++ b/apps/openmw/mwgui/widgets.hpp @@ -7,6 +7,9 @@ #include "../mwmechanics/stat.hpp" +#undef MYGUI_EXPORT +#define MYGUI_EXPORT + /* This file contains various custom widgets used in OpenMW. */ diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index c069474034..edd923f433 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -65,7 +65,7 @@ static ALenum getALFormat(ChannelConfig chans, SampleType type) class OpenAL_SoundStream : public Sound { static const ALuint sNumBuffers = 6; - static const ALfloat sBufferLength = 0.125f; + static const ALfloat sBufferLength; OpenAL_Output &mOutput; @@ -95,6 +95,8 @@ public: bool process(); }; +const ALfloat OpenAL_SoundStream::sBufferLength = 0.125f; + // // A background streaming thread (keeps active streams processed) // diff --git a/apps/openmw/mwsound/soundmanager.hpp b/apps/openmw/mwsound/soundmanager.hpp index b7c883a130..a076c1cc01 100644 --- a/apps/openmw/mwsound/soundmanager.hpp +++ b/apps/openmw/mwsound/soundmanager.hpp @@ -24,7 +24,7 @@ namespace MWWorld namespace MWSound { class Sound_Output; - class Sound_Decoder; + struct Sound_Decoder; class Sound; typedef boost::shared_ptr DecoderPtr; diff --git a/cmake/FindFFMPEG.cmake b/cmake/FindFFMPEG.cmake index ff6d0c598d..2e755d047d 100644 --- a/cmake/FindFFMPEG.cmake +++ b/cmake/FindFFMPEG.cmake @@ -9,9 +9,23 @@ SET( FFMPEG_FOUND "NO" ) +FIND_PATH( FFMPEG_general_INCLUDE_DIR libavcodec/avcodec.h libavformat/avformat.h + HINTS + PATHS + /usr/include + /usr/local/include + /usr/include/ffmpeg + /usr/local/include/ffmpeg + /usr/include/ffmpeg/libavcodec + /usr/local/include/ffmpeg/libavcodec + /usr/include/libavcodec + /usr/local/include/libavcodec + ) + FIND_PATH( FFMPEG_avcodec_INCLUDE_DIR avcodec.h HINTS PATHS + ${FFMPEG_general_INCLUDE_DIR}/libavcodec /usr/include /usr/local/include /usr/include/ffmpeg @@ -25,6 +39,7 @@ FIND_PATH( FFMPEG_avcodec_INCLUDE_DIR avcodec.h FIND_PATH( FFMPEG_avformat_INCLUDE_DIR avformat.h HINTS PATHS + ${FFMPEG_general_INCLUDE_DIR}/libavformat /usr/include /usr/local/include /usr/include/ffmpeg @@ -35,7 +50,7 @@ FIND_PATH( FFMPEG_avformat_INCLUDE_DIR avformat.h /usr/local/include/libavformat ) -set(FFMPEG_INCLUDE_DIR ${FFMPEG_avcodec_INCLUDE_DIR} ${FFMPEG_avformat_INCLUDE_DIR}) +set(FFMPEG_INCLUDE_DIR ${FFMPEG_general_INCLUDE_DIR} ${FFMPEG_avcodec_INCLUDE_DIR} ${FFMPEG_avformat_INCLUDE_DIR}) IF( FFMPEG_INCLUDE_DIR ) diff --git a/cmake/FindMyGUI.cmake b/cmake/FindMyGUI.cmake index 339f494ddb..fa0b25383c 100644 --- a/cmake/FindMyGUI.cmake +++ b/cmake/FindMyGUI.cmake @@ -103,7 +103,7 @@ SEPARATE_ARGUMENTS(MYGUI_PLATFORM_LIBRARIES) SET(MYGUI_INCLUDE_DIRS ${MYGUI_INCLUDE_DIRS} CACHE PATH "") SET(MYGUI_LIBRARIES ${MYGUI_LIBRARIES} CACHE STRING "") -SET(MYGUI_LIBRARIES ${MYGUI_PLATFORM_LIBRARIES} CACHE STRING "") +SET(MYGUI_PLATFORM_LIBRARIES ${MYGUI_PLATFORM_LIBRARIES} CACHE STRING "") SET(MYGUI_LIB_DIR ${MYGUI_LIB_DIR} CACHE PATH "") IF (MYGUI_INCLUDE_DIRS AND MYGUI_LIBRARIES)