summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-06-24 12:21:07 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-06-24 12:21:07 +0300
commit478d5c8fd71be218e37b2b3a9fd7e5c8ec5b08b7 (patch)
tree52cf93dc77d62893d7a6623c4af0573703fcdf73
parentd009b84dcb60fca1a41a3e908bdb73a3f33bb38f (diff)
build system: install .pc file and cmake variables for the Qt5GStreamerQuick library
... and fix the qmlplayer2 .pro file to test it. "make examples_distcheck" passes at this point.
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/modules/QtGStreamerConfig.cmake.in1
-rw-r--r--examples/qmlplayer2/qmlplayer2.pro2
-rw-r--r--src/CMakeLists.txt9
-rw-r--r--src/QGst/QtGStreamerQuick-1.0.pc.in11
5 files changed, 20 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f7e30f..d706553 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,6 +67,7 @@ elseif (${QT_VERSION} STREQUAL "4")
set(USE_QT4 TRUE)
set(QTGLIB_LIBRARY QtGLib)
set(QTGSTREAMER_LIBRARY QtGStreamer)
+ set(QTGSTREAMER_QUICK_LIBRARY "")
set(QTGSTREAMER_UI_LIBRARY QtGStreamerUi)
set(QTGSTREAMER_UTILS_LIBRARY QtGStreamerUtils)
set(QTGSTREAMER_PACKAGE_NAME QtGStreamer)
diff --git a/cmake/modules/QtGStreamerConfig.cmake.in b/cmake/modules/QtGStreamerConfig.cmake.in
index bebbf49..4b1f609 100644
--- a/cmake/modules/QtGStreamerConfig.cmake.in
+++ b/cmake/modules/QtGStreamerConfig.cmake.in
@@ -13,6 +13,7 @@ unset(_QTGSTREAMER_TARGETS_FILE)
set(@QTGSTREAMER_PACKAGE_NAME@_FOUND TRUE)
set(QTGLIB_LIBRARY @QTGLIB_LIBRARY@)
set(QTGSTREAMER_LIBRARY @QTGSTREAMER_LIBRARY@)
+set(QTGSTREAMER_QUICK_LIBRARY @QTGSTREAMER_QUICK_LIBRARY@)
set(QTGSTREAMER_UI_LIBRARY @QTGSTREAMER_UI_LIBRARY@)
set(QTGSTREAMER_UTILS_LIBRARY @QTGSTREAMER_UTILS_LIBRARY@)
set_and_check(QTGSTREAMER_INCLUDE_DIR @PACKAGE_QTGSTREAMER_INCLUDES_INSTALL_DIR@)
diff --git a/examples/qmlplayer2/qmlplayer2.pro b/examples/qmlplayer2/qmlplayer2.pro
index d1afbce..405aa9d 100644
--- a/examples/qmlplayer2/qmlplayer2.pro
+++ b/examples/qmlplayer2/qmlplayer2.pro
@@ -10,7 +10,7 @@ CONFIG += silent
CONFIG += link_pkgconfig
# Now tell qmake to link to QtGStreamer and also use its include path and Cflags.
-PKGCONFIG += QtGStreamer-1.0 QtGStreamerUi-1.0
+PKGCONFIG += Qt5GStreamerQuick-1.0
# Recommended if you are using g++ 4.5 or later. Must be removed for other compilers.
#QMAKE_CXXFLAGS += -std=c++0x
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1d5f516..c0011df 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -85,7 +85,10 @@ foreach(pc_in_file ${PC_IN_FILES})
if (USE_QT5)
string(REPLACE "Qt" "Qt5" pc_out_file ${pc_out_file})
endif()
- configure_file(${pc_in_file} ${CMAKE_CURRENT_BINARY_DIR}/${pc_out_file} @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_out_file}
- DESTINATION ${QTGSTREAMER_PC_INSTALL_DIR})
+ # Qt4 version of the QtGStreamerQuick .pc file should not be installed
+ if (NOT ${pc_out_file} MATCHES "QtGStreamerQuick.*")
+ configure_file(${pc_in_file} ${CMAKE_CURRENT_BINARY_DIR}/${pc_out_file} @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_out_file}
+ DESTINATION ${QTGSTREAMER_PC_INSTALL_DIR})
+ endif()
endforeach()
diff --git a/src/QGst/QtGStreamerQuick-1.0.pc.in b/src/QGst/QtGStreamerQuick-1.0.pc.in
new file mode 100644
index 0000000..21ca0ec
--- /dev/null
+++ b/src/QGst/QtGStreamerQuick-1.0.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@QTGSTREAMER_INCLUDES_INSTALL_DIR@
+
+Name: @QTGSTREAMER_QUICK_LIBRARY@-1.0
+Description: QtQuick GStreamer integration library
+Requires: @Qt4or5_Quick2_PKGCONFIG_DEP@ @QTGSTREAMER_LIBRARY@-1.0
+Version: @QTGSTREAMER_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -l@QTGSTREAMER_QUICK_LIBRARY@-1.0