summaryrefslogtreecommitdiffstats
path: root/examples/dbus
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-12 10:21:40 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-12 14:19:53 +0000
commitefa9998521cb061051fe8b75d0df3206d0b32ec5 (patch)
tree814ad216d5360cea3397a22ed1d649821d76fb17 /examples/dbus
parent6732fa3a291e77acad3ab6ba829d1026462dc139 (diff)
Fix compiling of examples on Android
* Simplify add_qt_gui_executable() to not require WIN32/MACOSX_BUNDLE but provide it implicitly. It's redundant :) * When on Android, build a module (shared library), just like qmake. This requires an additional library destination in the install() call, but that's ignored on other platforms. * Fix typos in the android deployment generation settings function * Use the correct cache variable to determine whether we're inside a Qt build or not. Right now this only works inside Qt builds anyway as QtPlatformAndroid.cmake is not publically accessible. Change-Id: If1c763c31a7a83d0e0d854362ba7901657f63eb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'examples/dbus')
-rw-r--r--examples/dbus/chat/CMakeLists.txt3
-rw-r--r--examples/dbus/complexpingpong/CMakeLists.txt3
-rw-r--r--examples/dbus/listnames/CMakeLists.txt3
-rw-r--r--examples/dbus/pingpong/CMakeLists.txt3
-rw-r--r--examples/dbus/remotecontrolledcar/car/CMakeLists.txt3
-rw-r--r--examples/dbus/remotecontrolledcar/controller/CMakeLists.txt3
6 files changed, 12 insertions, 6 deletions
diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt
index 85da98583c..54becdb2d3 100644
--- a/examples/dbus/chat/CMakeLists.txt
+++ b/examples/dbus/chat/CMakeLists.txt
@@ -27,7 +27,7 @@ qt5_add_dbus_adaptor(chat_SRCS
chat_adaptor
)
# special case end
-add_qt_gui_executable(chat WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(chat
chat.cpp chat.h
chatmainwindow.ui
chatsetnickname.ui
@@ -40,4 +40,5 @@ target_link_libraries(chat PUBLIC
install(TARGETS chat
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt
index fb96f826b4..d9b882657e 100644
--- a/examples/dbus/complexpingpong/CMakeLists.txt
+++ b/examples/dbus/complexpingpong/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS DBus)
-add_qt_gui_executable(complexpong WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(complexpong
complexpong.cpp complexpong.h
)
target_link_libraries(complexpong PUBLIC
@@ -23,4 +23,5 @@ target_link_libraries(complexpong PUBLIC
install(TARGETS complexpong
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt
index c888a1df49..334d841cdf 100644
--- a/examples/dbus/listnames/CMakeLists.txt
+++ b/examples/dbus/listnames/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS DBus)
-add_qt_gui_executable(listnames WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(listnames
listnames.cpp
)
target_link_libraries(listnames PUBLIC
@@ -23,4 +23,5 @@ target_link_libraries(listnames PUBLIC
install(TARGETS listnames
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt
index 1e93e3cef3..4cae8ecfdf 100644
--- a/examples/dbus/pingpong/CMakeLists.txt
+++ b/examples/dbus/pingpong/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS DBus)
-add_qt_gui_executable(pong WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(pong
ping-common.h
pong.cpp pong.h
)
@@ -24,4 +24,5 @@ target_link_libraries(pong PUBLIC
install(TARGETS pong
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
index cee3b2bb50..18af20fe38 100644
--- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
@@ -23,7 +23,7 @@ qt5_add_dbus_adaptor(car_SRCS
car_adaptor
)
# special case end
-add_qt_gui_executable(car WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(car
car.cpp car.h
main.cpp
${car_SRCS} # special case
@@ -35,4 +35,5 @@ target_link_libraries(car PUBLIC
install(TARGETS car
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
index ee97e0d1e4..06a975db7e 100644
--- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
@@ -21,7 +21,7 @@ qt5_add_dbus_interface(controller_SRCS
car_interface
)
# special case end
-add_qt_gui_executable(controller WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(controller
controller.cpp controller.h controller.ui
main.cpp
${controller_SRCS} # special case
@@ -33,4 +33,5 @@ target_link_libraries(controller PUBLIC
install(TARGETS controller
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)