From aa50b377a7d904e35cf3a26e4c8a054108011ffd Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 20 Mar 2019 13:41:37 +0100 Subject: CMake: Add widgets examples Change-Id: Ib6142b93df066e3658eb189b50ca74c455fe7e56 Reviewed-by: Alexandru Croitor --- examples/widgets/mainwindows/CMakeLists.txt | 8 +++++ .../widgets/mainwindows/application/CMakeLists.txt | 26 ++++++++++++++++ .../widgets/mainwindows/dockwidgets/CMakeLists.txt | 32 ++++++++++++++++++++ .../widgets/mainwindows/mainwindow/CMakeLists.txt | 35 ++++++++++++++++++++++ examples/widgets/mainwindows/mdi/CMakeLists.txt | 27 +++++++++++++++++ examples/widgets/mainwindows/menus/CMakeLists.txt | 16 ++++++++++ examples/widgets/mainwindows/sdi/CMakeLists.txt | 26 ++++++++++++++++ 7 files changed, 170 insertions(+) create mode 100644 examples/widgets/mainwindows/CMakeLists.txt create mode 100644 examples/widgets/mainwindows/application/CMakeLists.txt create mode 100644 examples/widgets/mainwindows/dockwidgets/CMakeLists.txt create mode 100644 examples/widgets/mainwindows/mainwindow/CMakeLists.txt create mode 100644 examples/widgets/mainwindows/mdi/CMakeLists.txt create mode 100644 examples/widgets/mainwindows/menus/CMakeLists.txt create mode 100644 examples/widgets/mainwindows/sdi/CMakeLists.txt (limited to 'examples/widgets/mainwindows') diff --git a/examples/widgets/mainwindows/CMakeLists.txt b/examples/widgets/mainwindows/CMakeLists.txt new file mode 100644 index 0000000000..8bb5f52f92 --- /dev/null +++ b/examples/widgets/mainwindows/CMakeLists.txt @@ -0,0 +1,8 @@ +# Generated from mainwindows.pro. + +add_subdirectory(application) +add_subdirectory(dockwidgets) +add_subdirectory(mainwindow) +add_subdirectory(mdi) +add_subdirectory(menus) +add_subdirectory(sdi) diff --git a/examples/widgets/mainwindows/application/CMakeLists.txt b/examples/widgets/mainwindows/application/CMakeLists.txt new file mode 100644 index 0000000000..8a9bdea2c2 --- /dev/null +++ b/examples/widgets/mainwindows/application/CMakeLists.txt @@ -0,0 +1,26 @@ +# Generated from application.pro. + +##################################################################### +## application Binary: +##################################################################### + +add_qt_executable(application + GUI + OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/application" + INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/application" + SOURCES + main.cpp + mainwindow.cpp mainwindow.h + LIBRARIES + Qt::Widgets +) + +# Resources: +add_qt_resource(application "application" FILES + images/copy.png + images/cut.png + images/new.png + images/open.png + images/paste.png + images/save.png) + diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt new file mode 100644 index 0000000000..e8fd580fd8 --- /dev/null +++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt @@ -0,0 +1,32 @@ +# Generated from dockwidgets.pro. + +##################################################################### +## dockwidgets Binary: +##################################################################### + +add_qt_executable(dockwidgets + GUI + OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/dockwidgets" + INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/dockwidgets" + SOURCES + main.cpp + mainwindow.cpp mainwindow.h + LIBRARIES + Qt::Widgets +) + +# Resources: +add_qt_resource(dockwidgets "dockwidgets" FILES + images/new.png + images/print.png + images/save.png + images/undo.png) + + +## Scopes: +##################################################################### + +extend_target(dockwidgets CONDITION TARGET Qt::PrintSupport + LIBRARIES + Qt::PrintSupport +) diff --git a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt new file mode 100644 index 0000000000..df1d9b6355 --- /dev/null +++ b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt @@ -0,0 +1,35 @@ +# Generated from mainwindow.pro. + +##################################################################### +## mainwindow Binary: +##################################################################### + +add_qt_executable(mainwindow + GUI + OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mainwindow" + INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mainwindow" + SOURCES + colorswatch.cpp colorswatch.h + main.cpp + mainwindow.cpp mainwindow.h + toolbar.cpp toolbar.h + LIBRARIES + Qt::Widgets +) + +# Resources: +add_qt_resource(mainwindow "mainwindow" PREFIX "/res" FILES + qt.png + titlebarCenter.png + titlebarLeft.png + titlebarRight.png) + + +#### Keys ignored in scope 1:.:mainwindow.pro:: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +#### Keys ignored in scope 2:.:mainwindow.pro:build_all AND NOT build_pass: +# CONFIG = "-build_all" "release" diff --git a/examples/widgets/mainwindows/mdi/CMakeLists.txt b/examples/widgets/mainwindows/mdi/CMakeLists.txt new file mode 100644 index 0000000000..c20acbdfca --- /dev/null +++ b/examples/widgets/mainwindows/mdi/CMakeLists.txt @@ -0,0 +1,27 @@ +# Generated from mdi.pro. + +##################################################################### +## mdi Binary: +##################################################################### + +add_qt_executable(mdi + GUI + OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mdi" + INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mdi" + SOURCES + main.cpp + mainwindow.cpp mainwindow.h + mdichild.cpp mdichild.h + LIBRARIES + Qt::Widgets +) + +# Resources: +add_qt_resource(mdi "mdi" FILES + images/copy.png + images/cut.png + images/new.png + images/open.png + images/paste.png + images/save.png) + diff --git a/examples/widgets/mainwindows/menus/CMakeLists.txt b/examples/widgets/mainwindows/menus/CMakeLists.txt new file mode 100644 index 0000000000..6d7e471a8c --- /dev/null +++ b/examples/widgets/mainwindows/menus/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from menus.pro. + +##################################################################### +## menus Binary: +##################################################################### + +add_qt_executable(menus + GUI + OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/menus" + INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/menus" + SOURCES + main.cpp + mainwindow.cpp mainwindow.h + LIBRARIES + Qt::Widgets +) diff --git a/examples/widgets/mainwindows/sdi/CMakeLists.txt b/examples/widgets/mainwindows/sdi/CMakeLists.txt new file mode 100644 index 0000000000..8391aa0cbc --- /dev/null +++ b/examples/widgets/mainwindows/sdi/CMakeLists.txt @@ -0,0 +1,26 @@ +# Generated from sdi.pro. + +##################################################################### +## sdi Binary: +##################################################################### + +add_qt_executable(sdi + GUI + OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/sdi" + INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/sdi" + SOURCES + main.cpp + mainwindow.cpp mainwindow.h + LIBRARIES + Qt::Widgets +) + +# Resources: +add_qt_resource(sdi "sdi" FILES + images/copy.png + images/cut.png + images/new.png + images/open.png + images/paste.png + images/save.png) + -- cgit v1.2.3