aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2018-04-19 06:34:11 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2018-04-20 10:06:37 +0000
commit4a3318e5b342e19bb1430d89d7fc0784e92be2d0 (patch)
treeaf6e7b0a0a3a61c5d61c37717660c29e0e9732da /recipes-qt
parent35f8981b11b4fcc7789f86fe2beed3f8841ee88d (diff)
tufao: fix build with Qt 5.11, don't use qt5_use_modules
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt')
-rw-r--r--recipes-qt/tufao/tufao/0001-CMakeLists.txt-fix-build-with-Qt-5.11-don-t-use-qt5_.patch91
-rw-r--r--recipes-qt/tufao/tufao_1.3.10.bb4
2 files changed, 94 insertions, 1 deletions
diff --git a/recipes-qt/tufao/tufao/0001-CMakeLists.txt-fix-build-with-Qt-5.11-don-t-use-qt5_.patch b/recipes-qt/tufao/tufao/0001-CMakeLists.txt-fix-build-with-Qt-5.11-don-t-use-qt5_.patch
new file mode 100644
index 00000000..50dd7844
--- /dev/null
+++ b/recipes-qt/tufao/tufao/0001-CMakeLists.txt-fix-build-with-Qt-5.11-don-t-use-qt5_.patch
@@ -0,0 +1,91 @@
+From 85a4a1fcba0d81fbd8c4af3421114360f32c384e Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 19 Apr 2018 06:31:09 +0000
+Subject: [PATCH] CMakeLists.txt: fix build with Qt 5.11, don't use
+ qt5_use_modules
+
+* replace deprecated (and in 5.11 removed) qt5_use_modules macro usage with
+ the list of libraries in target_link_libraries as suggested in:
+ https://stackoverflow.com/questions/31172156/what-to-use-instead-of-qt5-use-modules
+
+Upstream-Status: Submitted https://github.com/vinipsmaker/tufao/pull/91
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ examples/cmake/hello-cmake/CMakeLists.txt | 3 +--
+ examples/cmake/sample_plugin/plugins/CMakeLists.txt | 3 +--
+ examples/cmake/sample_plugin/src/CMakeLists.txt | 3 +--
+ src/CMakeLists.txt | 2 +-
+ src/tests/CMakeLists.txt | 3 +--
+ 5 files changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/examples/cmake/hello-cmake/CMakeLists.txt b/examples/cmake/hello-cmake/CMakeLists.txt
+index 1995220..e93c83c 100644
+--- a/examples/cmake/hello-cmake/CMakeLists.txt
++++ b/examples/cmake/hello-cmake/CMakeLists.txt
+@@ -13,5 +13,4 @@ find_package(CXX11 REQUIRED)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}")
+
+ add_executable(${PROJECT_NAME} main.cpp)
+-qt5_use_modules(${PROJECT_NAME} Core Network)
+-target_link_libraries(${PROJECT_NAME} ${TUFAO_LIBRARIES})
++target_link_libraries(${PROJECT_NAME} ${TUFAO_LIBRARIES} Qt5::Core Qt5::Network)
+diff --git a/examples/cmake/sample_plugin/plugins/CMakeLists.txt b/examples/cmake/sample_plugin/plugins/CMakeLists.txt
+index 3099dfb..b0ded18 100644
+--- a/examples/cmake/sample_plugin/plugins/CMakeLists.txt
++++ b/examples/cmake/sample_plugin/plugins/CMakeLists.txt
+@@ -9,5 +9,4 @@ set(PLUGIN_HEADERS
+ )
+
+ add_library(Test SHARED ${PLUGIN_HEADERS} ${PLUGIN_SOURCE})
+-qt5_use_modules(Test Core Network)
+-target_link_libraries(Test ${TUFAO_LIBRARIES})
++target_link_libraries(Test ${TUFAO_LIBRARIES} Qt5::Test Qt5::Core Qt5::Network)
+diff --git a/examples/cmake/sample_plugin/src/CMakeLists.txt b/examples/cmake/sample_plugin/src/CMakeLists.txt
+index 379440f..fe97a0f 100644
+--- a/examples/cmake/sample_plugin/src/CMakeLists.txt
++++ b/examples/cmake/sample_plugin/src/CMakeLists.txt
+@@ -9,5 +9,4 @@ set(${PROJECT_NAME}_HEADERS
+ )
+
+ add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_HEADERS} ${${PROJECT_NAME}_SOURCE})
+-qt5_use_modules(${PROJECT_NAME} Core Network)
+-target_link_libraries(${PROJECT_NAME} ${TUFAO_LIBRARIES} ${Test})
++target_link_libraries(${PROJECT_NAME} ${TUFAO_LIBRARIES} ${Test} Qt5::Core Qt5::Network)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3b10a35..91e619e 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -36,7 +36,7 @@ endif()
+
+ add_library("${TUFAO_LIBRARY}" SHARED ${tufao_SRC})
+
+-qt5_use_modules("${TUFAO_LIBRARY}" Core Network)
++target_link_libraries("${TUFAO_LIBRARY}" Qt5::Core Qt5::Network)
+
+ set_target_properties(
+ "${TUFAO_LIBRARY}"
+diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
+index cc2fef7..2ec9fa9 100644
+--- a/src/tests/CMakeLists.txt
++++ b/src/tests/CMakeLists.txt
+@@ -20,7 +20,6 @@ set(tests
+ )
+
+ macro(setup_test_target target)
+- qt5_use_modules("${target}" Core Network Test)
+ set_target_properties(
+ "${target}"
+ PROPERTIES
+@@ -43,7 +42,7 @@ macro(setup_test_target target)
+ endif()
+
+
+- target_link_libraries("${target}" "${TUFAO_LIBRARY}")
++target_link_libraries("${target}" "${TUFAO_LIBRARY}" Qt5::Core Qt5::Network Qt5::Test)
+
+ add_test(NAME "${target}"
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src"
+--
+2.17.0
+
diff --git a/recipes-qt/tufao/tufao_1.3.10.bb b/recipes-qt/tufao/tufao_1.3.10.bb
index d4b62e2b..719269f1 100644
--- a/recipes-qt/tufao/tufao_1.3.10.bb
+++ b/recipes-qt/tufao/tufao_1.3.10.bb
@@ -5,7 +5,9 @@ DEPENDS = "qtbase"
SRCREV = "ad505c32d0ba14c3c616de8ba4c7eb79396c20a6"
SRC_URI = "git://github.com/vinipsmaker/tufao.git;protocol=http;branch=1.x \
- file://build-Fix-mkspecs-and-CMake-module-install-directori.patch"
+ file://build-Fix-mkspecs-and-CMake-module-install-directori.patch \
+ file://0001-CMakeLists.txt-fix-build-with-Qt-5.11-don-t-use-qt5_.patch \
+"
# This includes bugfixes from 1.x branch
PV_append = "+${SRCPV}"