summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/webchannel/chatserver-cpp/CMakeLists.txt12
-rw-r--r--examples/webchannel/standalone/.prev_CMakeLists.txt12
-rw-r--r--examples/webchannel/standalone/CMakeLists.txt12
-rw-r--r--src/webchannel/CMakeLists.txt10
-rw-r--r--tests/auto/qml/.prev_CMakeLists.txt34
-rw-r--r--tests/auto/qml/CMakeLists.txt8
-rw-r--r--tests/auto/webchannel/.prev_CMakeLists.txt25
-rw-r--r--tests/auto/webchannel/CMakeLists.txt8
8 files changed, 100 insertions, 21 deletions
diff --git a/examples/webchannel/chatserver-cpp/CMakeLists.txt b/examples/webchannel/chatserver-cpp/CMakeLists.txt
index 3a3a2c9..0bb0c6a 100644
--- a/examples/webchannel/chatserver-cpp/CMakeLists.txt
+++ b/examples/webchannel/chatserver-cpp/CMakeLists.txt
@@ -9,18 +9,26 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/webchannel/chatserver-cpp")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webchannel/chatserver-cpp")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS WebSockets)
find_package(Qt6 COMPONENTS WebChannel)
-add_executable(chatserver
+qt_add_executable(chatserver
../shared/websocketclientwrapper.cpp ../shared/websocketclientwrapper.h
../shared/websockettransport.cpp ../shared/websockettransport.h
chatserver.cpp chatserver.h
main.cpp
)
+set_target_properties(chatserver PROPERTIES
+ WIN32_EXECUTABLE FALSE
+ MACOSX_BUNDLE TRUE
+)
target_link_libraries(chatserver PUBLIC
Qt::Core
Qt::WebChannel
diff --git a/examples/webchannel/standalone/.prev_CMakeLists.txt b/examples/webchannel/standalone/.prev_CMakeLists.txt
index a170cb6..5ee4b27 100644
--- a/examples/webchannel/standalone/.prev_CMakeLists.txt
+++ b/examples/webchannel/standalone/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/webchannel/standalone")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webchannel/standalone")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -17,13 +21,17 @@ find_package(Qt6 COMPONENTS WebChannel)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS WebSockets)
-add_qt_gui_executable(standalone
+qt_add_executable(standalone
../shared/websocketclientwrapper.cpp ../shared/websocketclientwrapper.h
../shared/websockettransport.cpp ../shared/websockettransport.h
core.h
dialog.cpp dialog.h dialog.ui
main.cpp
)
+set_target_properties(standalone PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
target_compile_definitions(standalone PUBLIC
${CMAKE_CURRENT_BINARY_DIR}"\\\"\""
BUILD_DIR="\"
diff --git a/examples/webchannel/standalone/CMakeLists.txt b/examples/webchannel/standalone/CMakeLists.txt
index 78977cd..ff085c5 100644
--- a/examples/webchannel/standalone/CMakeLists.txt
+++ b/examples/webchannel/standalone/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/webchannel/standalone")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webchannel/standalone")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -17,13 +21,17 @@ find_package(Qt6 COMPONENTS WebChannel)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS WebSockets)
-add_qt_gui_executable(standalone
+qt_add_executable(standalone
../shared/websocketclientwrapper.cpp ../shared/websocketclientwrapper.h
../shared/websockettransport.cpp ../shared/websockettransport.h
core.h
dialog.cpp dialog.h dialog.ui
main.cpp
)
+set_target_properties(standalone PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
# special case begin
# pro2cmake generates invalid cmake syntax here
target_compile_definitions(standalone PUBLIC
diff --git a/src/webchannel/CMakeLists.txt b/src/webchannel/CMakeLists.txt
index 9fba217..acd33fe 100644
--- a/src/webchannel/CMakeLists.txt
+++ b/src/webchannel/CMakeLists.txt
@@ -4,7 +4,7 @@
## WebChannel Module:
#####################################################################
-qt_add_module(WebChannel
+qt_internal_add_module(WebChannel
SOURCES
qmetaobjectpublisher.cpp qmetaobjectpublisher_p.h
qwebchannel.cpp qwebchannel.h qwebchannel_p.h
@@ -29,7 +29,7 @@ set(resources_resource_files
set_source_files_properties(${resources_resource_files} PROPERTIES QT_SKIP_QUICKCOMPILER 1)
-qt_add_resource(WebChannel "resources"
+qt_internal_add_resource(WebChannel "resources"
PREFIX
"/qtwebchannel/"
FILES
@@ -43,7 +43,7 @@ qt_add_resource(WebChannel "resources"
## Scopes:
#####################################################################
-qt_extend_target(WebChannel CONDITION TARGET Qt::Qml
+qt_internal_extend_target(WebChannel CONDITION TARGET Qt::Qml
SOURCES
qqmlwebchannel.cpp
qqmlwebchannelattached.cpp
@@ -55,11 +55,11 @@ qt_extend_target(WebChannel CONDITION TARGET Qt::Qml
# PRIVATE_HEADERS = "qqmlwebchannelattached_p.h"
# PUBLIC_HEADERS = "qqmlwebchannel.h"
-qt_extend_target(WebChannel CONDITION NOT TARGET Qt::Qml
+qt_internal_extend_target(WebChannel CONDITION NOT TARGET Qt::Qml
DEFINES
QT_NO_JSVALUE
)
-qt_add_docs(WebChannel
+qt_internal_add_docs(WebChannel
doc/qtwebchannel.qdocconf
)
diff --git a/tests/auto/qml/.prev_CMakeLists.txt b/tests/auto/qml/.prev_CMakeLists.txt
new file mode 100644
index 0000000..18f78b3
--- /dev/null
+++ b/tests/auto/qml/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from qml.pro.
+
+#####################################################################
+## qml Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ data/*)
+list(APPEND test_data ${test_data_glob})
+
+qt_internal_add_test(qml
+ QMLTEST
+ QML_IMPORTPATH
+ "${CMAKE_CURRENT_BINARY_DIR}/../../../qml"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ SOURCES
+ qml.cpp
+ testobject.cpp testobject.h
+ testtransport.cpp testtransport.h
+ testwebchannel.cpp testwebchannel.h
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::WebChannelPrivate
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qml.pro:<TRUE>:
+# DISTFILES = "tst_webchannelseparation.qml"
+# IMPORTPATH = "$$OUT_PWD/../../../qml" "$$PWD"
+# OTHER_FILES = "Client.qml" "WebChannelTest.qml" "tst_webchannel.qml" "tst_metaobjectpublisher.qml" "tst_bench.qml" "tst_multiclient.qml"
+# TEMPLATE = "app"
diff --git a/tests/auto/qml/CMakeLists.txt b/tests/auto/qml/CMakeLists.txt
index c292d77..d4b3613 100644
--- a/tests/auto/qml/CMakeLists.txt
+++ b/tests/auto/qml/CMakeLists.txt
@@ -10,7 +10,7 @@ file(GLOB_RECURSE test_data_glob
data/*)
list(APPEND test_data ${test_data_glob})
-qt_internal_add_test(tst_qmlwebchannel
+qt_internal_add_test(tst_qmlwebchannel # special case
QMLTEST
QML_IMPORTPATH
"${CMAKE_CURRENT_BINARY_DIR}/../../../qml"
@@ -20,12 +20,10 @@ qt_internal_add_test(tst_qmlwebchannel
testobject.cpp testobject.h
testtransport.cpp testtransport.h
testwebchannel.cpp testwebchannel.h
- LIBRARIES
- Qt::CorePrivate
- Qt::WebChannelPrivate
PUBLIC_LIBRARIES
+ Qt::CorePrivate
Qt::Gui
- Qt::WebChannel
+ Qt::WebChannelPrivate
TESTDATA ${test_data}
)
diff --git a/tests/auto/webchannel/.prev_CMakeLists.txt b/tests/auto/webchannel/.prev_CMakeLists.txt
new file mode 100644
index 0000000..fea5db4
--- /dev/null
+++ b/tests/auto/webchannel/.prev_CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from webchannel.pro.
+
+#####################################################################
+## tst_webchannel Test:
+#####################################################################
+
+qt_internal_add_test(tst_webchannel
+ SOURCES
+ tst_webchannel.cpp tst_webchannel.h
+ INCLUDE_DIRECTORIES
+ ../../../src/webchannel
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::WebChannelPrivate
+)
+
+## Scopes:
+#####################################################################
+
+qt_internal_extend_target(tst_webchannel CONDITION TARGET Qt::Qml
+ DEFINES
+ WEBCHANNEL_TESTS_CAN_USE_JS_ENGINE
+ PUBLIC_LIBRARIES
+ Qt::Qml
+)
diff --git a/tests/auto/webchannel/CMakeLists.txt b/tests/auto/webchannel/CMakeLists.txt
index 1f7d734..fea5db4 100644
--- a/tests/auto/webchannel/CMakeLists.txt
+++ b/tests/auto/webchannel/CMakeLists.txt
@@ -4,22 +4,20 @@
## tst_webchannel Test:
#####################################################################
-qt_add_test(tst_webchannel
+qt_internal_add_test(tst_webchannel
SOURCES
tst_webchannel.cpp tst_webchannel.h
INCLUDE_DIRECTORIES
../../../src/webchannel
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::WebChannelPrivate
- PUBLIC_LIBRARIES
- Qt::WebChannel
)
## Scopes:
#####################################################################
-qt_extend_target(tst_webchannel CONDITION TARGET Qt::Qml
+qt_internal_extend_target(tst_webchannel CONDITION TARGET Qt::Qml
DEFINES
WEBCHANNEL_TESTS_CAN_USE_JS_ENGINE
PUBLIC_LIBRARIES