From 4a2828a3d30fa1e4760a6778b8b58569caefb632 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 23 Jul 2021 10:08:00 +0200 Subject: CMake: Explicitly link against the built QtNetwork library This is to ensure that the pre-existing QtNetwork library from the b2qt SDK sysroot in the CI is not picked up. This is likely a consequence of CMake not adding an -rpath-link flag when linking. See QTBUG-86533 for details. Task-number: QTBUG-86533 Pick-to: 6.2 Change-Id: Id05d49812f957c8a6c12c03f5ff633015bd63103 Reviewed-by: Fabian Kosmale --- examples/serialbus/can/CMakeLists.txt | 1 + examples/serialbus/modbus/client/CMakeLists.txt | 1 + examples/serialbus/modbus/custom/CMakeLists.txt | 1 + examples/serialbus/modbus/server/CMakeLists.txt | 1 + src/plugins/canbus/passthrucan/CMakeLists.txt | 1 + src/plugins/canbus/peakcan/CMakeLists.txt | 1 + src/plugins/canbus/socketcan/CMakeLists.txt | 1 + src/plugins/canbus/systeccan/CMakeLists.txt | 1 + src/plugins/canbus/tinycan/CMakeLists.txt | 1 + src/plugins/canbus/vectorcan/CMakeLists.txt | 1 + src/tools/canbusutil/CMakeLists.txt | 3 ++- tests/auto/plugins/genericcanbus/CMakeLists.txt | 1 + tests/auto/qcanbus/CMakeLists.txt | 1 + tests/auto/qcanbusdevice/CMakeLists.txt | 1 + tests/auto/qcanbusframe/CMakeLists.txt | 1 + tests/auto/qmodbusadu/CMakeLists.txt | 1 + tests/auto/qmodbusclient/CMakeLists.txt | 1 + tests/auto/qmodbuscommevent/CMakeLists.txt | 1 + tests/auto/qmodbusdataunit/CMakeLists.txt | 1 + tests/auto/qmodbusdevice/CMakeLists.txt | 1 + tests/auto/qmodbusdeviceidentification/CMakeLists.txt | 1 + tests/auto/qmodbuspdu/CMakeLists.txt | 1 + tests/auto/qmodbusreply/CMakeLists.txt | 1 + tests/auto/qmodbusrtuserialclient/CMakeLists.txt | 1 + tests/manual/modbus/adueditor/CMakeLists.txt | 1 + 25 files changed, 26 insertions(+), 1 deletion(-) diff --git a/examples/serialbus/can/CMakeLists.txt b/examples/serialbus/can/CMakeLists.txt index c9d3a11..e9f15f0 100644 --- a/examples/serialbus/can/CMakeLists.txt +++ b/examples/serialbus/can/CMakeLists.txt @@ -34,6 +34,7 @@ set_target_properties(can PROPERTIES target_link_libraries(can PUBLIC Qt::Core Qt::Gui + Qt::Network Qt::SerialBus Qt::Widgets ) diff --git a/examples/serialbus/modbus/client/CMakeLists.txt b/examples/serialbus/modbus/client/CMakeLists.txt index 09ae8f5..d2e7f42 100644 --- a/examples/serialbus/modbus/client/CMakeLists.txt +++ b/examples/serialbus/modbus/client/CMakeLists.txt @@ -31,6 +31,7 @@ set_target_properties(modbusclient PROPERTIES target_link_libraries(modbusclient PUBLIC Qt::Core Qt::Gui + Qt::Network Qt::SerialBus Qt::Widgets ) diff --git a/examples/serialbus/modbus/custom/CMakeLists.txt b/examples/serialbus/modbus/custom/CMakeLists.txt index cfe398f..010ac0e 100644 --- a/examples/serialbus/modbus/custom/CMakeLists.txt +++ b/examples/serialbus/modbus/custom/CMakeLists.txt @@ -34,6 +34,7 @@ set_target_properties(customcommand PROPERTIES target_link_libraries(customcommand PRIVATE Qt::Core Qt::Gui + Qt::Network Qt::SerialBus Qt::Widgets ) diff --git a/examples/serialbus/modbus/server/CMakeLists.txt b/examples/serialbus/modbus/server/CMakeLists.txt index 8b762da..1fadc34 100644 --- a/examples/serialbus/modbus/server/CMakeLists.txt +++ b/examples/serialbus/modbus/server/CMakeLists.txt @@ -30,6 +30,7 @@ set_target_properties(modbusserver PROPERTIES target_link_libraries(modbusserver PUBLIC Qt::Core Qt::Gui + Qt::Network Qt::SerialBus Qt::Widgets ) diff --git a/src/plugins/canbus/passthrucan/CMakeLists.txt b/src/plugins/canbus/passthrucan/CMakeLists.txt index 5dd0261..45e8ab9 100644 --- a/src/plugins/canbus/passthrucan/CMakeLists.txt +++ b/src/plugins/canbus/passthrucan/CMakeLists.txt @@ -11,5 +11,6 @@ qt_internal_add_plugin(PassThruCanBusPlugin passthrucanbackend.cpp passthrucanbackend.h passthrucanio.cpp passthrucanio.h LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/src/plugins/canbus/peakcan/CMakeLists.txt b/src/plugins/canbus/peakcan/CMakeLists.txt index 06099d2..a3e690f 100644 --- a/src/plugins/canbus/peakcan/CMakeLists.txt +++ b/src/plugins/canbus/peakcan/CMakeLists.txt @@ -11,5 +11,6 @@ qt_internal_add_plugin(PeakCanBusPlugin peakcanbackend.cpp peakcanbackend.h peakcanbackend_p.h LIBRARIES Qt::Core + Qt::Network Qt::SerialBus ) diff --git a/src/plugins/canbus/socketcan/CMakeLists.txt b/src/plugins/canbus/socketcan/CMakeLists.txt index d3d6bcf..03c5aca 100644 --- a/src/plugins/canbus/socketcan/CMakeLists.txt +++ b/src/plugins/canbus/socketcan/CMakeLists.txt @@ -11,5 +11,6 @@ qt_internal_add_plugin(SocketCanBusPlugin socketcanbackend.cpp socketcanbackend.h LIBRARIES Qt::Core + Qt::Network Qt::SerialBus ) diff --git a/src/plugins/canbus/systeccan/CMakeLists.txt b/src/plugins/canbus/systeccan/CMakeLists.txt index 4b11932..cba6a47 100644 --- a/src/plugins/canbus/systeccan/CMakeLists.txt +++ b/src/plugins/canbus/systeccan/CMakeLists.txt @@ -11,5 +11,6 @@ qt_internal_add_plugin(SystecCanBusPlugin systeccanbackend.cpp systeccanbackend.h systeccanbackend_p.h PUBLIC_LIBRARIES Qt::Core + Qt::Network Qt::SerialBus ) diff --git a/src/plugins/canbus/tinycan/CMakeLists.txt b/src/plugins/canbus/tinycan/CMakeLists.txt index 7b03a72..9f6afe1 100644 --- a/src/plugins/canbus/tinycan/CMakeLists.txt +++ b/src/plugins/canbus/tinycan/CMakeLists.txt @@ -11,5 +11,6 @@ qt_internal_add_plugin(TinyCanBusPlugin tinycanbackend.cpp tinycanbackend.h tinycanbackend_p.h LIBRARIES Qt::Core + Qt::Network Qt::SerialBus ) diff --git a/src/plugins/canbus/vectorcan/CMakeLists.txt b/src/plugins/canbus/vectorcan/CMakeLists.txt index 0c81c15..8f76185 100644 --- a/src/plugins/canbus/vectorcan/CMakeLists.txt +++ b/src/plugins/canbus/vectorcan/CMakeLists.txt @@ -11,5 +11,6 @@ qt_internal_add_plugin(VectorCanBusPlugin vectorcanbackend.cpp vectorcanbackend.h vectorcanbackend_p.h PUBLIC_LIBRARIES Qt::Core + Qt::Network Qt::SerialBus ) diff --git a/src/tools/canbusutil/CMakeLists.txt b/src/tools/canbusutil/CMakeLists.txt index ce1d8b0..dfc8b77 100644 --- a/src/tools/canbusutil/CMakeLists.txt +++ b/src/tools/canbusutil/CMakeLists.txt @@ -11,6 +11,7 @@ qt_internal_add_tool(${target_name} main.cpp readtask.cpp readtask.h sigtermhandler.cpp sigtermhandler.h - PUBLIC_LIBRARIES + LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/plugins/genericcanbus/CMakeLists.txt b/tests/auto/plugins/genericcanbus/CMakeLists.txt index 298f99e..65813e6 100644 --- a/tests/auto/plugins/genericcanbus/CMakeLists.txt +++ b/tests/auto/plugins/genericcanbus/CMakeLists.txt @@ -12,5 +12,6 @@ qt_internal_add_plugin(GenericBusPlugin main.cpp PUBLIC_LIBRARIES Qt::Core + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qcanbus/CMakeLists.txt b/tests/auto/qcanbus/CMakeLists.txt index edd645f..c731c04 100644 --- a/tests/auto/qcanbus/CMakeLists.txt +++ b/tests/auto/qcanbus/CMakeLists.txt @@ -6,6 +6,7 @@ qt_internal_add_test(tst_qcanbus SOURCES tst_qcanbus.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qcanbusdevice/CMakeLists.txt b/tests/auto/qcanbusdevice/CMakeLists.txt index 0b73bbb..2881b0c 100644 --- a/tests/auto/qcanbusdevice/CMakeLists.txt +++ b/tests/auto/qcanbusdevice/CMakeLists.txt @@ -6,6 +6,7 @@ qt_internal_add_test(tst_qcanbusdevice SOURCES tst_qcanbusdevice.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qcanbusframe/CMakeLists.txt b/tests/auto/qcanbusframe/CMakeLists.txt index 8ba6b7f..2d62cea 100644 --- a/tests/auto/qcanbusframe/CMakeLists.txt +++ b/tests/auto/qcanbusframe/CMakeLists.txt @@ -6,5 +6,6 @@ qt_internal_add_test(tst_qcanbusframe SOURCES tst_qcanbusframe.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qmodbusadu/CMakeLists.txt b/tests/auto/qmodbusadu/CMakeLists.txt index b568588..49142c6 100644 --- a/tests/auto/qmodbusadu/CMakeLists.txt +++ b/tests/auto/qmodbusadu/CMakeLists.txt @@ -6,6 +6,7 @@ qt_internal_add_test(tst_qmodbusadu SOURCES tst_qmodbusadu.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus Qt::SerialBusPrivate ) diff --git a/tests/auto/qmodbusclient/CMakeLists.txt b/tests/auto/qmodbusclient/CMakeLists.txt index 3f4222a..ad808d3 100644 --- a/tests/auto/qmodbusclient/CMakeLists.txt +++ b/tests/auto/qmodbusclient/CMakeLists.txt @@ -11,6 +11,7 @@ qt_internal_add_test(tst_qmodbusclient tst_qmodbusclient.cpp PUBLIC_LIBRARIES Qt::CorePrivate + Qt::Network Qt::SerialBus Qt::SerialBusPrivate ) diff --git a/tests/auto/qmodbuscommevent/CMakeLists.txt b/tests/auto/qmodbuscommevent/CMakeLists.txt index 42cb953..954d13a 100644 --- a/tests/auto/qmodbuscommevent/CMakeLists.txt +++ b/tests/auto/qmodbuscommevent/CMakeLists.txt @@ -6,6 +6,7 @@ qt_internal_add_test(tst_qmodbuscommevent SOURCES tst_qmodbuscommevent.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus Qt::SerialBusPrivate ) diff --git a/tests/auto/qmodbusdataunit/CMakeLists.txt b/tests/auto/qmodbusdataunit/CMakeLists.txt index 4084af6..3d493fe 100644 --- a/tests/auto/qmodbusdataunit/CMakeLists.txt +++ b/tests/auto/qmodbusdataunit/CMakeLists.txt @@ -6,5 +6,6 @@ qt_internal_add_test(tst_qmodbusdataunit SOURCES tst_qmodbusdataunit.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qmodbusdevice/CMakeLists.txt b/tests/auto/qmodbusdevice/CMakeLists.txt index 00049d0..3733126 100644 --- a/tests/auto/qmodbusdevice/CMakeLists.txt +++ b/tests/auto/qmodbusdevice/CMakeLists.txt @@ -6,5 +6,6 @@ qt_internal_add_test(tst_qmodbusdevice SOURCES tst_qmodbusdevice.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qmodbusdeviceidentification/CMakeLists.txt b/tests/auto/qmodbusdeviceidentification/CMakeLists.txt index f56b6e7..c804b75 100644 --- a/tests/auto/qmodbusdeviceidentification/CMakeLists.txt +++ b/tests/auto/qmodbusdeviceidentification/CMakeLists.txt @@ -6,5 +6,6 @@ qt_internal_add_test(tst_qmodbusdeviceidentification SOURCES tst_qmodbusdeviceidentification.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qmodbuspdu/CMakeLists.txt b/tests/auto/qmodbuspdu/CMakeLists.txt index 782eb20..51148bd 100644 --- a/tests/auto/qmodbuspdu/CMakeLists.txt +++ b/tests/auto/qmodbuspdu/CMakeLists.txt @@ -6,5 +6,6 @@ qt_internal_add_test(tst_qmodbuspdu SOURCES tst_qmodbuspdu.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qmodbusreply/CMakeLists.txt b/tests/auto/qmodbusreply/CMakeLists.txt index 34a5585..c13d921 100644 --- a/tests/auto/qmodbusreply/CMakeLists.txt +++ b/tests/auto/qmodbusreply/CMakeLists.txt @@ -6,5 +6,6 @@ qt_internal_add_test(tst_qmodbusreply SOURCES tst_qmodbusreply.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/auto/qmodbusrtuserialclient/CMakeLists.txt b/tests/auto/qmodbusrtuserialclient/CMakeLists.txt index 4cebfed..da0825b 100644 --- a/tests/auto/qmodbusrtuserialclient/CMakeLists.txt +++ b/tests/auto/qmodbusrtuserialclient/CMakeLists.txt @@ -2,5 +2,6 @@ qt_internal_add_test(tst_qmodbusrtuserialclient SOURCES tst_qmodbusrtuserialclient.cpp PUBLIC_LIBRARIES + Qt::Network Qt::SerialBus ) diff --git a/tests/manual/modbus/adueditor/CMakeLists.txt b/tests/manual/modbus/adueditor/CMakeLists.txt index bedbea2..281a5da 100644 --- a/tests/manual/modbus/adueditor/CMakeLists.txt +++ b/tests/manual/modbus/adueditor/CMakeLists.txt @@ -10,6 +10,7 @@ qt_internal_add_manual_test(adueditor Qt::Core Qt::CorePrivate Qt::Gui + Qt::Network Qt::SerialBus Qt::SerialBusPrivate Qt::SerialPort -- cgit v1.2.3