summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 @@
1From 85a4a1fcba0d81fbd8c4af3421114360f32c384e Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 19 Apr 2018 06:31:09 +0000
4Subject: [PATCH] CMakeLists.txt: fix build with Qt 5.11, don't use
5 qt5_use_modules
6
7* replace deprecated (and in 5.11 removed) qt5_use_modules macro usage with
8 the list of libraries in target_link_libraries as suggested in:
9 https://stackoverflow.com/questions/31172156/what-to-use-instead-of-qt5-use-modules
10
11Upstream-Status: Submitted https://github.com/vinipsmaker/tufao/pull/91
12
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14---
15 examples/cmake/hello-cmake/CMakeLists.txt | 3 +--
16 examples/cmake/sample_plugin/plugins/CMakeLists.txt | 3 +--
17 examples/cmake/sample_plugin/src/CMakeLists.txt | 3 +--
18 src/CMakeLists.txt | 2 +-
19 src/tests/CMakeLists.txt | 3 +--
20 5 files changed, 5 insertions(+), 9 deletions(-)
21
22diff --git a/examples/cmake/hello-cmake/CMakeLists.txt b/examples/cmake/hello-cmake/CMakeLists.txt
23index 1995220..e93c83c 100644
24--- a/examples/cmake/hello-cmake/CMakeLists.txt
25+++ b/examples/cmake/hello-cmake/CMakeLists.txt
26@@ -13,5 +13,4 @@ find_package(CXX11 REQUIRED)
27 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}")
28
29 add_executable(${PROJECT_NAME} main.cpp)
30-qt5_use_modules(${PROJECT_NAME} Core Network)
31-target_link_libraries(${PROJECT_NAME} ${TUFAO_LIBRARIES})
32+target_link_libraries(${PROJECT_NAME} ${TUFAO_LIBRARIES} Qt5::Core Qt5::Network)
33diff --git a/examples/cmake/sample_plugin/plugins/CMakeLists.txt b/examples/cmake/sample_plugin/plugins/CMakeLists.txt
34index 3099dfb..b0ded18 100644
35--- a/examples/cmake/sample_plugin/plugins/CMakeLists.txt
36+++ b/examples/cmake/sample_plugin/plugins/CMakeLists.txt
37@@ -9,5 +9,4 @@ set(PLUGIN_HEADERS
38 )
39
40 add_library(Test SHARED ${PLUGIN_HEADERS} ${PLUGIN_SOURCE})
41-qt5_use_modules(Test Core Network)
42-target_link_libraries(Test ${TUFAO_LIBRARIES})
43+target_link_libraries(Test ${TUFAO_LIBRARIES} Qt5::Test Qt5::Core Qt5::Network)
44diff --git a/examples/cmake/sample_plugin/src/CMakeLists.txt b/examples/cmake/sample_plugin/src/CMakeLists.txt
45index 379440f..fe97a0f 100644
46--- a/examples/cmake/sample_plugin/src/CMakeLists.txt
47+++ b/examples/cmake/sample_plugin/src/CMakeLists.txt
48@@ -9,5 +9,4 @@ set(${PROJECT_NAME}_HEADERS
49 )
50
51 add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_HEADERS} ${${PROJECT_NAME}_SOURCE})
52-qt5_use_modules(${PROJECT_NAME} Core Network)
53-target_link_libraries(${PROJECT_NAME} ${TUFAO_LIBRARIES} ${Test})
54+target_link_libraries(${PROJECT_NAME} ${TUFAO_LIBRARIES} ${Test} Qt5::Core Qt5::Network)
55diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
56index 3b10a35..91e619e 100644
57--- a/src/CMakeLists.txt
58+++ b/src/CMakeLists.txt
59@@ -36,7 +36,7 @@ endif()
60
61 add_library("${TUFAO_LIBRARY}" SHARED ${tufao_SRC})
62
63-qt5_use_modules("${TUFAO_LIBRARY}" Core Network)
64+target_link_libraries("${TUFAO_LIBRARY}" Qt5::Core Qt5::Network)
65
66 set_target_properties(
67 "${TUFAO_LIBRARY}"
68diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
69index cc2fef7..2ec9fa9 100644
70--- a/src/tests/CMakeLists.txt
71+++ b/src/tests/CMakeLists.txt
72@@ -20,7 +20,6 @@ set(tests
73 )
74
75 macro(setup_test_target target)
76- qt5_use_modules("${target}" Core Network Test)
77 set_target_properties(
78 "${target}"
79 PROPERTIES
80@@ -43,7 +42,7 @@ macro(setup_test_target target)
81 endif()
82
83
84- target_link_libraries("${target}" "${TUFAO_LIBRARY}")
85+target_link_libraries("${target}" "${TUFAO_LIBRARY}" Qt5::Core Qt5::Network Qt5::Test)
86
87 add_test(NAME "${target}"
88 WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src"
89--
902.17.0
91
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"
5 5
6SRCREV = "ad505c32d0ba14c3c616de8ba4c7eb79396c20a6" 6SRCREV = "ad505c32d0ba14c3c616de8ba4c7eb79396c20a6"
7SRC_URI = "git://github.com/vinipsmaker/tufao.git;protocol=http;branch=1.x \ 7SRC_URI = "git://github.com/vinipsmaker/tufao.git;protocol=http;branch=1.x \
8 file://build-Fix-mkspecs-and-CMake-module-install-directori.patch" 8 file://build-Fix-mkspecs-and-CMake-module-install-directori.patch \
9 file://0001-CMakeLists.txt-fix-build-with-Qt-5.11-don-t-use-qt5_.patch \
10"
9 11
10# This includes bugfixes from 1.x branch 12# This includes bugfixes from 1.x branch
11PV_append = "+${SRCPV}" 13PV_append = "+${SRCPV}"