summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-11 15:46:31 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-12 14:19:34 +0000
commit6732fa3a291e77acad3ab6ba829d1026462dc139 (patch)
treeeae7522ffebf148907ff58421ea4681e7726f99a /examples/widgets/painting
parent82840d2660202c6d8f3c53ad1d620667901cb954 (diff)
Fix linking of examples
Provide add_qt_gui_executable() as function in our public API that takes care of automaticWinMain linkage. We can use this in the future to encapsulate similarplatform-specific behavior and adjustments, such as module generation onAndroid. In order for the examples to see the function in Qt5CoreMacros, three more additional fixes were required: * Do the build_repo_end() call _before_ attempting to build the examples, as we need the build_repo_end() to include QtPostProcess and complete the creation of all the target config files. Otherwise the find_package() calls in the examples see something incomplete. * Add more QT_NO_CREATE_TARGET guards * Always call find_dependency on the dependencies, regardless of the target creation mode. This way a find_package(Qt5 COMPONENTS Widgets) will still load Qt5CoreMacros. Change-Id: I03ce856e2f4312a050fe8043b8331cbe8a6c93e6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/widgets/painting')
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/basicdrawing/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/concentriccircles/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/imagecomposition/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/painterpaths/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/pathstroke/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/transformations/CMakeLists.txt2
11 files changed, 11 insertions, 11 deletions
diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt
index a3dc7861fa..4c8d408e9c 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_executable(affine WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(affine WIN32 MACOSX_BUNDLE
# special case: remove files from ../shared
affine.qrc
main.cpp
diff --git a/examples/widgets/painting/basicdrawing/CMakeLists.txt b/examples/widgets/painting/basicdrawing/CMakeLists.txt
index d0a0ac749d..112334797f 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_executable(basicdrawing WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(basicdrawing WIN32 MACOSX_BUNDLE
basicdrawing.qrc
main.cpp
renderarea.cpp renderarea.h
diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt
index d083cf00dd..930374270e 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_executable(composition WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(composition WIN32 MACOSX_BUNDLE
# special case: remove files from ../shared
composition.cpp composition.h composition.qrc
main.cpp
diff --git a/examples/widgets/painting/concentriccircles/CMakeLists.txt b/examples/widgets/painting/concentriccircles/CMakeLists.txt
index edbfea218d..6005d5e806 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_executable(concentriccircles WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(concentriccircles WIN32 MACOSX_BUNDLE
circlewidget.cpp circlewidget.h
main.cpp
window.cpp window.h
diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt
index 591bc552ea..56e1a2e9d2 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_executable(deform WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(deform WIN32 MACOSX_BUNDLE
# special case: remove files from ../shared
deform.qrc
main.cpp
diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt
index e533cdb63a..e0be3158f2 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_executable(fontsampler WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(fontsampler WIN32 MACOSX_BUNDLE
main.cpp
mainwindow.cpp mainwindow.h
mainwindowbase.ui
diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt
index b25739e919..69b7fac294 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_executable(gradients WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(gradients WIN32 MACOSX_BUNDLE
# special case: remove files from ../shared
gradients.cpp gradients.h gradients.qrc
main.cpp
diff --git a/examples/widgets/painting/imagecomposition/CMakeLists.txt b/examples/widgets/painting/imagecomposition/CMakeLists.txt
index 506a3d8510..1fcedbcc9f 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_executable(imagecomposition WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(imagecomposition WIN32 MACOSX_BUNDLE
imagecomposer.cpp imagecomposer.h
imagecomposition.qrc
main.cpp
diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt
index 423d7d98ed..56007a3e54 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_executable(painterpaths WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(painterpaths WIN32 MACOSX_BUNDLE
main.cpp
renderarea.cpp renderarea.h
window.cpp window.h
diff --git a/examples/widgets/painting/pathstroke/CMakeLists.txt b/examples/widgets/painting/pathstroke/CMakeLists.txt
index ce32f38549..fac73d2a53 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_executable(pathstroke WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(pathstroke WIN32 MACOSX_BUNDLE
../shared/arthurstyle.cpp ../shared/arthurstyle.h
../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
../shared/hoverpoints.cpp ../shared/hoverpoints.h
diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt
index 5837f90f9d..3218073a96 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_executable(transformations WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(transformations WIN32 MACOSX_BUNDLE
main.cpp
renderarea.cpp renderarea.h
window.cpp window.h