mirror of
https://github.com/qt/qtmqtt.git
synced 2026-10-25 16:16:26 +00:00
CMake: Disable usage of CMake API compatibility wrappers
Setting the QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS variable in the project ensures we ported away from old API calls. Task-number: QTBUG-86815 Change-Id: I589f0192370a932ac10088656eaee1e35a41ea73 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
f580d0d814
commit
f9ebebfce7
@ -10,6 +10,9 @@ project(QtMqtt
|
||||
LANGUAGES CXX C
|
||||
)
|
||||
|
||||
# Make sure we only use latest private CMake API, aka no compatibility wrappers.
|
||||
set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE)
|
||||
|
||||
# Make sure we use the fixed BASE argument of qt_add_resource.
|
||||
set(QT_USE_FIXED_QT_ADD_RESOURCE_BASE TRUE)
|
||||
|
||||
|
||||
@ -17,10 +17,14 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/mqtt/consolepubsub")
|
||||
|
||||
find_package(Qt6 COMPONENTS Mqtt)
|
||||
|
||||
add_executable(qtmqtt_pub
|
||||
qt_add_executable(qtmqtt_pub
|
||||
configuration.h
|
||||
main_pub.cpp
|
||||
)
|
||||
set_target_properties(qtmqtt_pub PROPERTIES
|
||||
WIN32_EXECUTABLE FALSE
|
||||
MACOSX_BUNDLE FALSE
|
||||
)
|
||||
target_compile_definitions(qtmqtt_pub PUBLIC
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
@ -52,10 +56,14 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/mqtt/consolepubsub")
|
||||
|
||||
find_package(Qt6 COMPONENTS Mqtt)
|
||||
|
||||
add_executable(qtmqtt_sub
|
||||
qt_add_executable(qtmqtt_sub
|
||||
configuration.h
|
||||
main_sub.cpp
|
||||
)
|
||||
set_target_properties(qtmqtt_sub PROPERTIES
|
||||
WIN32_EXECUTABLE FALSE
|
||||
MACOSX_BUNDLE FALSE
|
||||
)
|
||||
target_compile_definitions(qtmqtt_sub PUBLIC
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
@ -21,10 +21,14 @@ find_package(Qt6 COMPONENTS Qml)
|
||||
find_package(Qt6 COMPONENTS Quick)
|
||||
find_package(Qt6 COMPONENTS Mqtt)
|
||||
|
||||
add_qt_gui_executable(quickpublication
|
||||
qt_add_executable(quickpublication
|
||||
main.cpp
|
||||
qmlmqttclient.cpp qmlmqttclient.h
|
||||
)
|
||||
set_target_properties(quickpublication PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
MACOSX_BUNDLE TRUE
|
||||
)
|
||||
target_compile_definitions(quickpublication PUBLIC
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
@ -21,10 +21,14 @@ find_package(Qt6 COMPONENTS Qml)
|
||||
find_package(Qt6 COMPONENTS Quick)
|
||||
find_package(Qt6 COMPONENTS Mqtt)
|
||||
|
||||
add_qt_gui_executable(quicksubscription
|
||||
qt_add_executable(quicksubscription
|
||||
main.cpp
|
||||
qmlmqttclient.cpp qmlmqttclient.h
|
||||
)
|
||||
set_target_properties(quicksubscription PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
MACOSX_BUNDLE TRUE
|
||||
)
|
||||
target_compile_definitions(quicksubscription PUBLIC
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
@ -20,10 +20,14 @@ find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS Network)
|
||||
find_package(Qt6 COMPONENTS Mqtt)
|
||||
|
||||
add_qt_gui_executable(simplemqttclient
|
||||
qt_add_executable(simplemqttclient
|
||||
main.cpp
|
||||
mainwindow.cpp mainwindow.h mainwindow.ui
|
||||
)
|
||||
set_target_properties(simplemqttclient PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
MACOSX_BUNDLE TRUE
|
||||
)
|
||||
target_compile_definitions(simplemqttclient PUBLIC
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
@ -21,10 +21,14 @@ find_package(Qt6 COMPONENTS Network)
|
||||
find_package(Qt6 COMPONENTS Mqtt)
|
||||
find_package(Qt6 COMPONENTS Widgets) # special case
|
||||
|
||||
add_qt_gui_executable(simplemqttclient
|
||||
qt_add_executable(simplemqttclient
|
||||
main.cpp
|
||||
mainwindow.cpp mainwindow.h mainwindow.ui
|
||||
)
|
||||
set_target_properties(simplemqttclient PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
MACOSX_BUNDLE TRUE
|
||||
)
|
||||
target_compile_definitions(simplemqttclient PUBLIC
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
@ -21,11 +21,15 @@ find_package(Qt6 COMPONENTS Network)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
find_package(Qt6 COMPONENTS Mqtt)
|
||||
|
||||
add_qt_gui_executable(mqttsubscriptions
|
||||
qt_add_executable(mqttsubscriptions
|
||||
main.cpp
|
||||
mainwindow.cpp mainwindow.h mainwindow.ui
|
||||
subscriptionwindow.cpp subscriptionwindow.h subscriptionwindow.ui
|
||||
)
|
||||
set_target_properties(mqttsubscriptions PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
MACOSX_BUNDLE TRUE
|
||||
)
|
||||
target_compile_definitions(mqttsubscriptions PUBLIC
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
@ -19,11 +19,15 @@ find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS WebSockets)
|
||||
find_package(Qt6 COMPONENTS Mqtt)
|
||||
|
||||
add_executable(websocketsubscription
|
||||
qt_add_executable(websocketsubscription
|
||||
clientsubscription.cpp clientsubscription.h
|
||||
main.cpp
|
||||
websocketiodevice.cpp websocketiodevice.h
|
||||
)
|
||||
set_target_properties(websocketsubscription PROPERTIES
|
||||
WIN32_EXECUTABLE FALSE
|
||||
MACOSX_BUNDLE FALSE
|
||||
)
|
||||
target_compile_definitions(websocketsubscription PUBLIC
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## Mqtt Module:
|
||||
#####################################################################
|
||||
|
||||
qt_add_module(Mqtt
|
||||
qt_internal_add_module(Mqtt
|
||||
SOURCES
|
||||
qmqttauthenticationproperties.cpp qmqttauthenticationproperties.h
|
||||
qmqttclient.cpp qmqttclient.h qmqttclient_p.h
|
||||
@ -27,7 +27,6 @@ qt_add_module(Mqtt
|
||||
PRIVATE_MODULE_INTERFACE
|
||||
Qt::CorePrivate
|
||||
)
|
||||
qt_add_docs(Mqtt
|
||||
qt_internal_add_docs(Mqtt
|
||||
doc/qtmqtt.qdocconf
|
||||
)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_conformance Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_conformance
|
||||
qt_internal_add_test(tst_conformance
|
||||
SOURCES
|
||||
../../common/broker_connection.h
|
||||
tst_conformance.cpp
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqttclient Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqttclient
|
||||
qt_internal_add_test(tst_qmqttclient
|
||||
SOURCES
|
||||
../../common/broker_connection.h
|
||||
tst_qmqttclient.cpp
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqttconnectionproperties Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqttconnectionproperties
|
||||
qt_internal_add_test(tst_qmqttconnectionproperties
|
||||
SOURCES
|
||||
../../common/broker_connection.h
|
||||
tst_qmqttconnectionproperties.cpp
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqttcontrolpacket Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqttcontrolpacket
|
||||
qt_internal_add_test(tst_qmqttcontrolpacket
|
||||
SOURCES
|
||||
tst_qmqttcontrolpacket.cpp
|
||||
DEFINES
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqttlastwillproperties Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqttlastwillproperties
|
||||
qt_internal_add_test(tst_qmqttlastwillproperties
|
||||
SOURCES
|
||||
../../common/broker_connection.h
|
||||
tst_qmqttlastwillproperties.cpp
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqttpublishproperties Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqttpublishproperties
|
||||
qt_internal_add_test(tst_qmqttpublishproperties
|
||||
SOURCES
|
||||
../../common/broker_connection.h
|
||||
tst_qmqttpublishproperties.cpp
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqttsubscription Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqttsubscription
|
||||
qt_internal_add_test(tst_qmqttsubscription
|
||||
SOURCES
|
||||
../../common/broker_connection.h
|
||||
tst_qmqttsubscription.cpp
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqttsubscriptionproperties Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqttsubscriptionproperties
|
||||
qt_internal_add_test(tst_qmqttsubscriptionproperties
|
||||
SOURCES
|
||||
../../common/broker_connection.h
|
||||
tst_qmqttsubscriptionproperties.cpp
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqtttopicfilter Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqtttopicfilter
|
||||
qt_internal_add_test(tst_qmqtttopicfilter
|
||||
SOURCES
|
||||
tst_qmqtttopicfilter.cpp
|
||||
DEFINES
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
## tst_qmqtttopicname Test:
|
||||
#####################################################################
|
||||
|
||||
qt_add_test(tst_qmqtttopicname
|
||||
qt_internal_add_test(tst_qmqtttopicname
|
||||
SOURCES
|
||||
tst_qmqtttopicname.cpp
|
||||
DEFINES
|
||||
|
||||
Loading…
Reference in New Issue
Block a user