summaryrefslogtreecommitdiffstats
path: root/examples/widgets/graphicsview
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/widgets/graphicsview
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/widgets/graphicsview')
-rw-r--r--examples/widgets/graphicsview/anchorlayout/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/boxes/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/chip/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/collidingmice/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/diagramscene/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/elasticnodes/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/flowlayout/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/padnavigator/CMakeLists.txt1
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt3
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt3
13 files changed, 25 insertions, 12 deletions
diff --git a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
index 9676dbbcba..7137e76d9b 100644
--- a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(anchorlayout WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(anchorlayout
main.cpp
)
target_link_libraries(anchorlayout PUBLIC
@@ -23,4 +23,5 @@ target_link_libraries(anchorlayout PUBLIC
install(TARGETS anchorlayout
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
index 982fd541c6..afe4475bbf 100644
--- a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
+++ b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(basicgraphicslayouts WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(basicgraphicslayouts
basicgraphicslayouts.qrc
layoutitem.cpp layoutitem.h
main.cpp
@@ -26,4 +26,5 @@ target_link_libraries(basicgraphicslayouts PUBLIC
install(TARGETS basicgraphicslayouts
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/boxes/CMakeLists.txt b/examples/widgets/graphicsview/boxes/CMakeLists.txt
index b5441bcfdf..856dfd1716 100644
--- a/examples/widgets/graphicsview/boxes/CMakeLists.txt
+++ b/examples/widgets/graphicsview/boxes/CMakeLists.txt
@@ -15,7 +15,7 @@ find_package(Qt5 COMPONENTS OpenGL)
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(boxes WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(boxes
3rdparty/fbm.c 3rdparty/fbm.h
boxes.qrc
glbuffers.cpp glbuffers.h
@@ -35,4 +35,5 @@ target_link_libraries(boxes PUBLIC
install(TARGETS boxes
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt
index 141645a22c..f02cbacf37 100644
--- a/examples/widgets/graphicsview/chip/CMakeLists.txt
+++ b/examples/widgets/graphicsview/chip/CMakeLists.txt
@@ -15,7 +15,7 @@ find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS OpenGL) # special case
find_package(Qt5 COMPONENTS PrintSupport) # special case
-add_qt_gui_executable(chip WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(chip
chip.cpp chip.h
images.qrc
main.cpp
@@ -35,4 +35,5 @@ endif()
install(TARGETS chip
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
index 9001858817..2817710600 100644
--- a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
+++ b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(collidingmice WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(collidingmice
main.cpp
mice.qrc
mouse.cpp mouse.h
@@ -25,4 +25,5 @@ target_link_libraries(collidingmice PUBLIC
install(TARGETS collidingmice
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
index bfdd3b8f5b..b1baf34b2d 100644
--- a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
+++ b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(diagramscene WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(diagramscene
arrow.cpp arrow.h
diagramitem.cpp diagramitem.h
diagramscene.cpp diagramscene.h diagramscene.qrc
@@ -28,4 +28,5 @@ target_link_libraries(diagramscene PUBLIC
install(TARGETS diagramscene
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
index d85dcd1ff9..df6d2ec4e8 100644
--- a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
+++ b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(dragdroprobot WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(dragdroprobot
coloritem.cpp coloritem.h
main.cpp
robot.cpp robot.h robot.qrc
@@ -25,4 +25,5 @@ target_link_libraries(dragdroprobot PUBLIC
install(TARGETS dragdroprobot
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
index b1e04b2a20..5fc7a424b0 100644
--- a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
+++ b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(elasticnodes WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(elasticnodes
edge.cpp edge.h
graphwidget.cpp graphwidget.h
main.cpp
@@ -26,4 +26,5 @@ target_link_libraries(elasticnodes PUBLIC
install(TARGETS elasticnodes
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
index fc9f6086ce..bfa68f15cb 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
+++ b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(embeddeddialogs WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(embeddeddialogs
customproxy.cpp customproxy.h
embeddeddialog.cpp embeddeddialog.h embeddeddialog.ui
embeddeddialogs.qrc
@@ -26,4 +26,5 @@ target_link_libraries(embeddeddialogs PUBLIC
install(TARGETS embeddeddialogs
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
index ef5a4d5564..14b6ea8561 100644
--- a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(graphicsview_flowlayout WIN32 MACOSX_BUNDLE # special case: renamed flowlayout
+add_qt_gui_executable(graphicsview_flowlayout # special case: renamed flowlayout
flowlayout.cpp flowlayout.h
main.cpp
window.cpp window.h
@@ -25,4 +25,5 @@ target_link_libraries(graphicsview_flowlayout PUBLIC # special case: renamed flo
install(TARGETS graphicsview_flowlayout # special case: renamed flowlayout
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
index e995f2a16e..2db8aa1cde 100644
--- a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
+++ b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
@@ -34,4 +34,5 @@ endif()
install(TARGETS padnavigator
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
index bc1564cb8c..f8def269b6 100644
--- a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(simpleanchorlayout WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(simpleanchorlayout
main.cpp
)
target_link_libraries(simpleanchorlayout PUBLIC
@@ -23,4 +23,5 @@ target_link_libraries(simpleanchorlayout PUBLIC
install(TARGETS simpleanchorlayout
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
index 22e92cc68b..939e6c3fc7 100644
--- a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(weatheranchorlayout WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(weatheranchorlayout
main.cpp
weatheranchorlayout.qrc
)
@@ -24,4 +24,5 @@ target_link_libraries(weatheranchorlayout PUBLIC
install(TARGETS weatheranchorlayout
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)