summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting
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/painting
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/painting')
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/basicdrawing/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/concentriccircles/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/imagecomposition/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/painterpaths/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/pathstroke/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/transformations/CMakeLists.txt3
11 files changed, 22 insertions, 11 deletions
diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt
index 4c8d408e9c..950503d9a7 100644
--- a/examples/widgets/painting/affine/CMakeLists.txt
+++ b/examples/widgets/painting/affine/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(affine WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(affine
# special case: remove files from ../shared
affine.qrc
main.cpp
@@ -30,4 +30,5 @@ target_link_libraries(affine PUBLIC
install(TARGETS affine
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/basicdrawing/CMakeLists.txt b/examples/widgets/painting/basicdrawing/CMakeLists.txt
index 112334797f..57a3dd346c 100644
--- a/examples/widgets/painting/basicdrawing/CMakeLists.txt
+++ b/examples/widgets/painting/basicdrawing/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(basicdrawing WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(basicdrawing
basicdrawing.qrc
main.cpp
renderarea.cpp renderarea.h
@@ -26,4 +26,5 @@ target_link_libraries(basicdrawing PUBLIC
install(TARGETS basicdrawing
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt
index 930374270e..48b139edc5 100644
--- a/examples/widgets/painting/composition/CMakeLists.txt
+++ b/examples/widgets/painting/composition/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(composition WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(composition
# special case: remove files from ../shared
composition.cpp composition.h composition.qrc
main.cpp
@@ -29,4 +29,5 @@ target_link_libraries(composition PUBLIC
install(TARGETS composition
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/concentriccircles/CMakeLists.txt b/examples/widgets/painting/concentriccircles/CMakeLists.txt
index 6005d5e806..4c26eb1ab3 100644
--- a/examples/widgets/painting/concentriccircles/CMakeLists.txt
+++ b/examples/widgets/painting/concentriccircles/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(concentriccircles WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(concentriccircles
circlewidget.cpp circlewidget.h
main.cpp
window.cpp window.h
@@ -25,4 +25,5 @@ target_link_libraries(concentriccircles PUBLIC
install(TARGETS concentriccircles
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt
index 56e1a2e9d2..8e2fa52d19 100644
--- a/examples/widgets/painting/deform/CMakeLists.txt
+++ b/examples/widgets/painting/deform/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(deform WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(deform
# special case: remove files from ../shared
deform.qrc
main.cpp
@@ -30,4 +30,5 @@ target_link_libraries(deform PUBLIC
install(TARGETS deform
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt
index e0be3158f2..ee7ff6b768 100644
--- a/examples/widgets/painting/fontsampler/CMakeLists.txt
+++ b/examples/widgets/painting/fontsampler/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(fontsampler WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(fontsampler
main.cpp
mainwindow.cpp mainwindow.h
mainwindowbase.ui
@@ -25,4 +25,5 @@ target_link_libraries(fontsampler PUBLIC
install(TARGETS fontsampler
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt
index 69b7fac294..218efc72a3 100644
--- a/examples/widgets/painting/gradients/CMakeLists.txt
+++ b/examples/widgets/painting/gradients/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(gradients WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(gradients
# special case: remove files from ../shared
gradients.cpp gradients.h gradients.qrc
main.cpp
@@ -29,4 +29,5 @@ target_link_libraries(gradients PUBLIC
install(TARGETS gradients
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/imagecomposition/CMakeLists.txt b/examples/widgets/painting/imagecomposition/CMakeLists.txt
index 1fcedbcc9f..4b3e9c78ea 100644
--- a/examples/widgets/painting/imagecomposition/CMakeLists.txt
+++ b/examples/widgets/painting/imagecomposition/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(imagecomposition WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(imagecomposition
imagecomposer.cpp imagecomposer.h
imagecomposition.qrc
main.cpp
@@ -25,4 +25,5 @@ target_link_libraries(imagecomposition PUBLIC
install(TARGETS imagecomposition
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt
index 56007a3e54..14fd70f3d3 100644
--- a/examples/widgets/painting/painterpaths/CMakeLists.txt
+++ b/examples/widgets/painting/painterpaths/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(painterpaths WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(painterpaths
main.cpp
renderarea.cpp renderarea.h
window.cpp window.h
@@ -25,4 +25,5 @@ target_link_libraries(painterpaths PUBLIC
install(TARGETS painterpaths
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/pathstroke/CMakeLists.txt b/examples/widgets/painting/pathstroke/CMakeLists.txt
index fac73d2a53..f12ccb0b54 100644
--- a/examples/widgets/painting/pathstroke/CMakeLists.txt
+++ b/examples/widgets/painting/pathstroke/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(pathstroke WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(pathstroke
../shared/arthurstyle.cpp ../shared/arthurstyle.h
../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
../shared/hoverpoints.cpp ../shared/hoverpoints.h
@@ -31,4 +31,5 @@ target_link_libraries(pathstroke PUBLIC
install(TARGETS pathstroke
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt
index 3218073a96..baa527d857 100644
--- a/examples/widgets/painting/transformations/CMakeLists.txt
+++ b/examples/widgets/painting/transformations/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(transformations WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(transformations
main.cpp
renderarea.cpp renderarea.h
window.cpp window.h
@@ -25,4 +25,5 @@ target_link_libraries(transformations PUBLIC
install(TARGETS transformations
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)