forked from RSATom/QmlVlc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possibility to build QmlVlc as QML plugin
QML plugins could be easily used with PyQt5 apps or any other language bindings. Build & Install QmlVlc as plugin: qmake && make && make install More info about Qt QML plugins: http://doc.qt.io/qt-5/qtqml-modules-cppplugins.html
- Loading branch information
Showing
5 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
.DS_Store | ||
*.o | ||
*.so | ||
moc_*.cpp | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module rsatom.qml.vlc | ||
plugin qmlvlcplugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
include(QmlVlc.pri) | ||
|
||
CONFIG += c++11 | ||
LIBS += -lvlc | ||
TARGET = qmlvlcplugin | ||
|
||
PLUGIN_IMPORT_PATH = rsatom/qml/vlc | ||
|
||
TEMPLATE = lib | ||
CONFIG += qt plugin | ||
QT += qml quick | ||
|
||
target.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH | ||
INSTALLS += target | ||
|
||
qmldir.files += $$_PRO_FILE_PWD_/qmldir | ||
qmldir.path += $$target.path | ||
INSTALLS += qmldir | ||
|
||
HEADERS += qmlvlc_plugin.h | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include <QtQml> | ||
#include <QQmlExtensionPlugin> | ||
|
||
#include <QmlVlc.h> | ||
|
||
#define QMLVLC_PLUGIN_ID "rsatom.qml.vlc" | ||
|
||
class Q_DECL_EXPORT QmlVlcExtensionPlugin : public QQmlExtensionPlugin { | ||
Q_OBJECT | ||
Q_PLUGIN_METADATA(IID QMLVLC_PLUGIN_ID) | ||
|
||
public: | ||
virtual void initializeEngine(QQmlEngine *engine, const char *uri) {} | ||
virtual void registerTypes(const char *uri) | ||
{ | ||
Q_ASSERT(QString(QMLVLC_PLUGIN_ID) == uri); | ||
RegisterQmlVlc(); | ||
} | ||
}; |