all repos — mgba @ e25fa272a842d96208a4740a41e74d5c657b28d7

mGBA Game Boy Advance Emulator

Qt: Fix Qt::5Multimedia build
Jeffrey Pfau jeffrey@endrift.com
Sat, 13 Dec 2014 16:07:04 -0800
commit

e25fa272a842d96208a4740a41e74d5c657b28d7

parent

e40709538914ef853405e7336ee2a62455d8a5b8

M src/platform/qt/AudioDevice.hsrc/platform/qt/AudioDevice.h

@@ -5,6 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this

* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef QGBA_AUDIO_DEVICE #define QGBA_AUDIO_DEVICE + #include <QAudioFormat> #include <QIODevice>
M src/platform/qt/AudioProcessorQt.hsrc/platform/qt/AudioProcessorQt.h

@@ -7,6 +7,8 @@ #ifndef QGBA_AUDIO_PROCESSOR_QT

#define QGBA_AUDIO_PROCESSOR_QT #include "AudioProcessor.h" + class QAudioOutput; + namespace QGBA { class AudioDevice;
M src/platform/qt/CMakeLists.txtsrc/platform/qt/CMakeLists.txt

@@ -54,13 +54,14 @@ LoadSaveState.ui

LogView.ui VideoView.ui) +set(QT_LIBRARIES) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libqt5widgets5,libqt5opengl5" PARENT_SCOPE) if(BUILD_SDL) list(APPEND SOURCE_FILES AudioProcessorSDL.cpp) elseif(Qt5Multimedia_FOUND) list(APPEND SOURCE_FILES - AudioProcessorQt.cpp - AudioDevice.cpp) + AudioProcessorQt.cpp + AudioDevice.cpp) list(APPEND QT_LIBRARIES Qt5::Multimedia) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libqt5multimedia5" PARENT_SCOPE) else()

@@ -85,7 +86,7 @@ endif()

add_executable(${BINARY_NAME}-qt WIN32 MACOSX_BUNDLE main.cpp ${CMAKE_SOURCE_DIR}/res/mgba.icns ${SOURCE_FILES} ${PLATFORM_SRC} ${UI_FILES} ${RESOURCES}) set_target_properties(${BINARY_NAME}-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/info.plist.in) -set(QT_LIBRARIES Qt5::Widgets Qt5::OpenGL) +list(APPEND QT_LIBRARIES Qt5::Widgets Qt5::OpenGL) target_link_libraries(${BINARY_NAME}-qt ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY} ${BINARY_NAME} ${QT_LIBRARIES}) install(TARGETS ${BINARY_NAME}-qt RUNTIME DESTINATION bin BUNDLE DESTINATION /Applications)