From 397b3725176780d8888f8499cac0127dbb7df2c7 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 26 Oct 2020 16:22:32 +0100 Subject: CMake: Regenerate examples to set the WIN32_EXECUTABLE property As well as the MACOSX_BUNDLE properties as necessary. Task-number: QTBUG-87664 Task-number: QTBUG-86827 Change-Id: I7677449a26d51fa853bd67bab6b3b61afbd2b12f Reviewed-by: Joerg Bornemann --- examples/dbus/chat/.prev_CMakeLists.txt | 4 ++++ examples/dbus/chat/CMakeLists.txt | 4 ++++ examples/dbus/complexpingpong/CMakeLists.txt | 8 ++++++++ examples/dbus/listnames/CMakeLists.txt | 10 ++++++++++ examples/dbus/pingpong/CMakeLists.txt | 8 ++++++++ examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt | 4 ++++ examples/dbus/remotecontrolledcar/car/CMakeLists.txt | 4 ++++ .../dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt | 4 ++++ examples/dbus/remotecontrolledcar/controller/CMakeLists.txt | 4 ++++ 9 files changed, 50 insertions(+) (limited to 'examples/dbus') diff --git a/examples/dbus/chat/.prev_CMakeLists.txt b/examples/dbus/chat/.prev_CMakeLists.txt index 601c28429e..9396cce3ac 100644 --- a/examples/dbus/chat/.prev_CMakeLists.txt +++ b/examples/dbus/chat/.prev_CMakeLists.txt @@ -25,6 +25,10 @@ qt_add_executable(chat chatmainwindow.ui chatsetnickname.ui ) +set_target_properties(chat PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(chat PUBLIC Qt::Core Qt::DBus diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt index 2ff002dd8d..998ffb5f25 100644 --- a/examples/dbus/chat/CMakeLists.txt +++ b/examples/dbus/chat/CMakeLists.txt @@ -39,6 +39,10 @@ qt_add_executable(chat chatsetnickname.ui ${chat_SRCS} # special case ) +set_target_properties(chat PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(chat PUBLIC Qt::Core Qt::DBus diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt index 414dbd8216..5cf1c2e9e3 100644 --- a/examples/dbus/complexpingpong/CMakeLists.txt +++ b/examples/dbus/complexpingpong/CMakeLists.txt @@ -21,6 +21,10 @@ qt_add_executable(complexping complexping.cpp complexping.h ping-common.h ) +set_target_properties(complexping PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(complexping PUBLIC # Remove: gui Qt::DBus @@ -51,6 +55,10 @@ find_package(Qt6 COMPONENTS DBus) qt_add_executable(complexpong complexpong.cpp complexpong.h ) +set_target_properties(complexpong PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(complexpong PUBLIC # Remove: gui Qt::DBus diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt index ed3a55118f..a1907648b1 100644 --- a/examples/dbus/listnames/CMakeLists.txt +++ b/examples/dbus/listnames/CMakeLists.txt @@ -21,11 +21,21 @@ find_package(Qt6 COMPONENTS DBus) qt_add_executable(listnames listnames.cpp ) +set_target_properties(listnames PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(listnames PUBLIC Qt::Core Qt::DBus ) +if(WIN32) + set_target_properties(listnames PROPERTIES + WIN32_EXECUTABLE FALSE + ) +endif() + install(TARGETS listnames RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt index beea918511..41b8f1b058 100644 --- a/examples/dbus/pingpong/CMakeLists.txt +++ b/examples/dbus/pingpong/CMakeLists.txt @@ -21,6 +21,10 @@ qt_add_executable(ping ping.cpp ping-common.h ) +set_target_properties(ping PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(ping PUBLIC # Remove: gui Qt::DBus @@ -52,6 +56,10 @@ qt_add_executable(pong ping-common.h pong.cpp pong.h ) +set_target_properties(pong PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(pong PUBLIC # Remove: gui Qt::DBus diff --git a/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt index 001a82e720..86b3fb8e52 100644 --- a/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt @@ -24,6 +24,10 @@ qt_add_executable(car car.cpp car.h main.cpp ) +set_target_properties(car PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(car PUBLIC Qt::Core Qt::DBus diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt index 533881d140..e20f657a9a 100644 --- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt @@ -34,6 +34,10 @@ qt_add_executable(car main.cpp ${car_SRCS} # special case ) +set_target_properties(car PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(car PUBLIC Qt::Core Qt::DBus diff --git a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt index f4f2443079..f1916c93f2 100644 --- a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt @@ -24,6 +24,10 @@ qt_add_executable(controller controller.cpp controller.h controller.ui main.cpp ) +set_target_properties(controller PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(controller PUBLIC Qt::Core Qt::DBus diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt index d27d428b07..f2433a43a2 100644 --- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt @@ -32,6 +32,10 @@ qt_add_executable(controller main.cpp ${controller_SRCS} # special case ) +set_target_properties(controller PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(controller PUBLIC Qt::Core Qt::DBus -- cgit v1.2.3