Qt: Fix Qt::5Multimedia build

This commit is contained in:
Jeffrey Pfau 2014-12-13 16:07:04 -08:00
parent e407095389
commit e25fa272a8
3 changed files with 7 additions and 3 deletions

View File

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef QGBA_AUDIO_DEVICE #ifndef QGBA_AUDIO_DEVICE
#define QGBA_AUDIO_DEVICE #define QGBA_AUDIO_DEVICE
#include <QAudioFormat> #include <QAudioFormat>
#include <QIODevice> #include <QIODevice>

View File

@ -7,6 +7,8 @@
#define QGBA_AUDIO_PROCESSOR_QT #define QGBA_AUDIO_PROCESSOR_QT
#include "AudioProcessor.h" #include "AudioProcessor.h"
class QAudioOutput;
namespace QGBA { namespace QGBA {
class AudioDevice; class AudioDevice;

View File

@ -54,13 +54,14 @@ qt5_wrap_ui(UI_FILES
LogView.ui LogView.ui
VideoView.ui) VideoView.ui)
set(QT_LIBRARIES)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libqt5widgets5,libqt5opengl5" PARENT_SCOPE) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libqt5widgets5,libqt5opengl5" PARENT_SCOPE)
if(BUILD_SDL) if(BUILD_SDL)
list(APPEND SOURCE_FILES AudioProcessorSDL.cpp) list(APPEND SOURCE_FILES AudioProcessorSDL.cpp)
elseif(Qt5Multimedia_FOUND) elseif(Qt5Multimedia_FOUND)
list(APPEND SOURCE_FILES list(APPEND SOURCE_FILES
AudioProcessorQt.cpp AudioProcessorQt.cpp
AudioDevice.cpp) AudioDevice.cpp)
list(APPEND QT_LIBRARIES Qt5::Multimedia) list(APPEND QT_LIBRARIES Qt5::Multimedia)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libqt5multimedia5" PARENT_SCOPE) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libqt5multimedia5" PARENT_SCOPE)
else() 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}) 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_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}) 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) install(TARGETS ${BINARY_NAME}-qt RUNTIME DESTINATION bin BUNDLE DESTINATION /Applications)