summaryrefslogtreecommitdiffstats
path: root/examples/widgets/mainwindows
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/mainwindows')
-rw-r--r--examples/widgets/mainwindows/application/CMakeLists.txt44
-rw-r--r--examples/widgets/mainwindows/dockwidgets/CMakeLists.txt50
-rw-r--r--examples/widgets/mainwindows/mainwindow/CMakeLists.txt48
-rw-r--r--examples/widgets/mainwindows/mdi/CMakeLists.txt46
-rw-r--r--examples/widgets/mainwindows/menus/CMakeLists.txt35
-rw-r--r--examples/widgets/mainwindows/sdi/CMakeLists.txt44
6 files changed, 140 insertions, 127 deletions
diff --git a/examples/widgets/mainwindows/application/CMakeLists.txt b/examples/widgets/mainwindows/application/CMakeLists.txt
index 8a9bdea2c2..67ac4637ff 100644
--- a/examples/widgets/mainwindows/application/CMakeLists.txt
+++ b/examples/widgets/mainwindows/application/CMakeLists.txt
@@ -1,26 +1,28 @@
# Generated from application.pro.
-#####################################################################
-## application Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(application LANGUAGES CXX)
-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
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(application WIN32 MACOSX_BUNDLE
+ application.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(application PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS application
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
index e8fd580fd8..ceacc184da 100644
--- a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
+++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
@@ -1,32 +1,34 @@
# Generated from dockwidgets.pro.
-#####################################################################
-## dockwidgets Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(dockwidgets LANGUAGES CXX)
-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
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(dockwidgets "dockwidgets" FILES
- images/new.png
- images/print.png
- images/save.png
- images/undo.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport) # special case
-## Scopes:
-#####################################################################
+add_executable(dockwidgets WIN32 MACOSX_BUNDLE
+ dockwidgets.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(dockwidgets PUBLIC
+ Qt::Widgets
+)
+# special case begin
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(dockwidgets PUBLIC Qt::PrintSupport)
+endif()
+# special case end
-extend_target(dockwidgets CONDITION TARGET Qt::PrintSupport
- LIBRARIES
- Qt::PrintSupport
+install(TARGETS dockwidgets
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
index df1d9b6355..5af2a7ffe9 100644
--- a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
@@ -1,35 +1,29 @@
# Generated from mainwindow.pro.
-#####################################################################
-## mainwindow Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mainwindow LANGUAGES CXX)
-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
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Resources:
-add_qt_resource(mainwindow "mainwindow" PREFIX "/res" FILES
- qt.png
- titlebarCenter.png
- titlebarLeft.png
- titlebarRight.png)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:mainwindow.pro:<NONE>:
-# TEMPLATE = "app"
+find_package(Qt5 COMPONENTS Widgets)
-## Scopes:
-#####################################################################
+add_executable(mainwindow WIN32 MACOSX_BUNDLE
+ colorswatch.cpp colorswatch.h
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.qrc
+ toolbar.cpp toolbar.h
+)
+target_link_libraries(mainwindow PUBLIC
+ Qt::Widgets
+)
-#### Keys ignored in scope 2:.:mainwindow.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
+install(TARGETS mainwindow
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/mainwindows/mdi/CMakeLists.txt b/examples/widgets/mainwindows/mdi/CMakeLists.txt
index c20acbdfca..481e2477c1 100644
--- a/examples/widgets/mainwindows/mdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mdi/CMakeLists.txt
@@ -1,27 +1,29 @@
# Generated from mdi.pro.
-#####################################################################
-## mdi Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mdi LANGUAGES CXX)
-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
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mdi WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ mdi.qrc
+ mdichild.cpp mdichild.h
+)
+target_link_libraries(mdi PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS mdi
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/mainwindows/menus/CMakeLists.txt b/examples/widgets/mainwindows/menus/CMakeLists.txt
index 6d7e471a8c..a10ef9090e 100644
--- a/examples/widgets/mainwindows/menus/CMakeLists.txt
+++ b/examples/widgets/mainwindows/menus/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from menus.pro.
-#####################################################################
-## menus Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(menus LANGUAGES CXX)
-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
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(menus WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(menus PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS menus
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/mainwindows/sdi/CMakeLists.txt b/examples/widgets/mainwindows/sdi/CMakeLists.txt
index 8391aa0cbc..81cb80f7a3 100644
--- a/examples/widgets/mainwindows/sdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/sdi/CMakeLists.txt
@@ -1,26 +1,28 @@
# Generated from sdi.pro.
-#####################################################################
-## sdi Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(sdi LANGUAGES CXX)
-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
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(sdi WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ sdi.qrc
+)
+target_link_libraries(sdi PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS sdi
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)