aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/sndfile
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2017-11-25 18:00:06 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2017-11-25 18:00:06 +0000
commit8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a (patch)
tree15d339b62e98d5858a57aa787334e14f0e2f0ad7 /src/plugins/Input/sndfile
parent6fc05db7c6de9a51beba754f12ff4ac32859977d (diff)
downloadqmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.tar.gz
qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.tar.bz2
qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.zip
copy 1.2 branch to trunk
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7772 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/sndfile')
-rw-r--r--src/plugins/Input/sndfile/CMakeLists.txt19
-rw-r--r--src/plugins/Input/sndfile/decodersndfilefactory.cpp8
-rw-r--r--src/plugins/Input/sndfile/decodersndfilefactory.h1
3 files changed, 7 insertions, 21 deletions
diff --git a/src/plugins/Input/sndfile/CMakeLists.txt b/src/plugins/Input/sndfile/CMakeLists.txt
index 9517d8d5b..c17dd02e9 100644
--- a/src/plugins/Input/sndfile/CMakeLists.txt
+++ b/src/plugins/Input/sndfile/CMakeLists.txt
@@ -1,26 +1,13 @@
project(libsndfile)
-# qt plugin
-ADD_DEFINITIONS( -Wall )
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_NO_DEBUG)
-ADD_DEFINITIONS(-DQT_SHARED)
-ADD_DEFINITIONS(-DQT_THREAD)
-
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-SET(QT_INCLUDES
- ${QT_INCLUDES}
- ${CMAKE_CURRENT_SOURCE_DIR}/../../../
-)
-
# libqmmp
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp)
# libsndfile
-pkg_search_module(SNDFILE sndfile)
+pkg_search_module(SNDFILE sndfile >= 1.0.21)
include_directories(${SNDFILE_INCLUDE_DIRS})
link_directories(${SNDFILE_LIBRARY_DIRS})
@@ -37,7 +24,7 @@ SET(libsndfile_HDRS
SET(libsndfile_RCCS translations/translations.qrc)
-QT4_ADD_RESOURCES(libsndfile_RCC_SRCS ${libsndfile_RCCS})
+QT5_ADD_RESOURCES(libsndfile_RCC_SRCS ${libsndfile_RCCS})
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
@@ -47,7 +34,7 @@ IF(SNDFILE_FOUND)
ADD_LIBRARY(sndfile MODULE ${libsndfile_SRCS} ${libsndfile_UIS_H}
${libsndfile_RCC_SRCS} ${libsndfile_HDRS})
add_dependencies(sndfile qmmp)
-target_link_libraries(sndfile ${QT_LIBRARIES} libqmmp ${SNDFILE_LDFLAGS})
+target_link_libraries(sndfile Qt5::Widgets -lqmmp ${SNDFILE_LDFLAGS})
install(TARGETS sndfile DESTINATION ${LIB_DIR}/qmmp/Input)
ENDIF(SNDFILE_FOUND)
diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp
index 59adeeede..c1235d068 100644
--- a/src/plugins/Input/sndfile/decodersndfilefactory.cpp
+++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2007-2016 by Ilya Kotov *
+ * Copyright (C) 2007-2015 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -17,10 +17,10 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <QRegExp>
+
#include <QMessageBox>
#include <QTranslator>
-#include <QtPlugin>
+#include <QRegExp>
#ifdef Q_OS_WIN
#include <windows.h>
#define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1
@@ -165,5 +165,3 @@ QTranslator *DecoderSndFileFactory::createTranslator(QObject *parent)
translator->load(QString(":/sndfile_plugin_") + locale);
return translator;
}
-
-Q_EXPORT_PLUGIN2(sndfile, DecoderSndFileFactory)
diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.h b/src/plugins/Input/sndfile/decodersndfilefactory.h
index 07e4ae28c..95931e428 100644
--- a/src/plugins/Input/sndfile/decodersndfilefactory.h
+++ b/src/plugins/Input/sndfile/decodersndfilefactory.h
@@ -34,6 +34,7 @@ class DecoderSndFileFactory : public QObject,
DecoderFactory
{
Q_OBJECT
+Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.DecoderFactoryInterface.1.0")
Q_INTERFACES(DecoderFactory)
public: