diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-06-09 12:11:01 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-06-09 19:20:26 +0300 |
commit | fe58b57def11e36260ba0b8d6717b43b0fe91d3d (patch) | |
tree | 02a4b2a4020547120442d835326fdb323306dc24 | |
parent | ad7e163fc7ec1548c52b04297febfbf8eecbf15f (diff) |
qml: Rename QtGStreamerQML to QtGStreamerQuick1 for less confusion and fix its loading on windows
-rw-r--r-- | src/qml/CMakeLists.txt | 26 | ||||
-rw-r--r-- | src/qml/plugin.cpp | 2 | ||||
-rw-r--r-- | src/qml/qmldir | 1 |
3 files changed, 18 insertions, 11 deletions
diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index 2e59b13..53ded96 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -1,19 +1,27 @@ -set(QtGStreamerQML_SRCS +set(QtGStreamerQuick1_SRCS plugin.cpp videoitem.cpp ) -add_library(QtGStreamerQML MODULE ${QtGStreamerQML_SRCS}) -target_link_libraries(QtGStreamerQML ${QTGSTREAMER_UI_LIBRARIES}) -qt4or5_use_modules(QtGStreamerQML Quick1) +add_library(QtGStreamerQuick1 MODULE ${QtGStreamerQuick1_SRCS}) +target_link_libraries(QtGStreamerQuick1 ${QTGSTREAMER_UI_LIBRARIES}) +qt4or5_use_modules(QtGStreamerQuick1 Quick1) -install(TARGETS QtGStreamerQML DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer) -install(FILES qmldir DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer) +if (WIN32 AND CMAKE_COMPILER_IS_GNUCXX) + # On windows with gcc, cmake calls the binary libFOO.dll, but the Qt plugin loader + # does not remove the lib prefix when searching for .dlls, unlike what happens on unix + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qmldir "plugin libQtGStreamerQuick1") +else() + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qmldir "plugin QtGStreamerQuick1") +endif() + +install(TARGETS QtGStreamerQuick1 DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer) # create a layout similar to the one in ${QTGSTREAMER_QTQUICK1_INSTALL_DIR} for testing -add_custom_command(TARGET QtGStreamerQML POST_BUILD +add_custom_command(TARGET QtGStreamerQuick1 POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer - COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:QtGStreamerQML> ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/ - COMMAND ${CMAKE_COMMAND} -E copy qmldir ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/ + COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:QtGStreamerQuick1> ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/qmldir ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/qml/plugin.cpp b/src/qml/plugin.cpp index 0192797..abb01bd 100644 --- a/src/qml/plugin.cpp +++ b/src/qml/plugin.cpp @@ -25,7 +25,7 @@ class QtGStreamerPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.freedesktop.gstreamer.Qt5GStreamerDeclarative-0.10") + Q_PLUGIN_METADATA(IID "org.freedesktop.gstreamer.Qt5GStreamerQuick1-0.10") public: void registerTypes(const char *uri); }; diff --git a/src/qml/qmldir b/src/qml/qmldir deleted file mode 100644 index 257b19c..0000000 --- a/src/qml/qmldir +++ /dev/null @@ -1 +0,0 @@ -plugin QtGStreamerQML |