All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-qt5][WIP][PATCH 2/2] tufao: fix build with Qt 5.11, don't use qt5_use_modules
Date: Thu, 19 Apr 2018 06:34:33 +0000	[thread overview]
Message-ID: <20180419063433.4985-2-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <20180419063433.4985-1-Martin.Jansa@gmail.com>

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...ix-build-with-Qt-5.11-don-t-use-qt5_.patch | 91 +++++++++++++++++++
 recipes-qt/tufao/tufao_1.3.10.bb              |  4 +-
 2 files changed, 94 insertions(+), 1 deletion(-)
 create mode 100644 recipes-qt/tufao/tufao/0001-CMakeLists.txt-fix-build-with-Qt-5.11-don-t-use-qt5_.patch

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 0000000..50dd784
--- /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 d4b62e2..719269f 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}"
-- 
2.17.0



      reply	other threads:[~2018-04-19  6:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19  6:34 [meta-qt5][WIP][PATCH 1/2] qt5: upgrade to 5.11 beta3+ Martin Jansa
2018-04-19  6:34 ` Martin Jansa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180419063433.4985-2-Martin.Jansa@gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.