diff options
Diffstat (limited to 'examples/widgets/mainwindows')
6 files changed, 18 insertions, 11 deletions
diff --git a/examples/widgets/mainwindows/application/CMakeLists.txt b/examples/widgets/mainwindows/application/CMakeLists.txt index 262548a6e1..297a8a31a8 100644 --- a/examples/widgets/mainwindows/application/CMakeLists.txt +++ b/examples/widgets/mainwindows/application/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") + set(INSTALL_EXAMPLESDIR "examples") endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/application") @@ -19,17 +19,18 @@ qt_add_executable(application main.cpp mainwindow.cpp mainwindow.h ) + set_target_properties(application PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) + target_link_libraries(application PUBLIC Qt::Core Qt::Gui Qt::Widgets ) - # Resources: set(application_resource_files "images/copy.png" diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt index 5dff006c70..599633909f 100644 --- a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt +++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") + set(INSTALL_EXAMPLESDIR "examples") endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/dockwidgets") @@ -22,10 +22,12 @@ qt_add_executable(dockwidgets main.cpp mainwindow.cpp mainwindow.h ) + set_target_properties(dockwidgets PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) + target_link_libraries(dockwidgets PUBLIC Qt::Core Qt::Gui @@ -36,7 +38,6 @@ if (TARGET Qt::PrintSupport) target_link_libraries(dockwidgets PUBLIC Qt::PrintSupport) endif() - # Resources: set(dockwidgets_resource_files "images/new.png" diff --git a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt index ee04a59d94..3eb634287e 100644 --- a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt +++ b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") + set(INSTALL_EXAMPLESDIR "examples") endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mainwindow") @@ -21,17 +21,18 @@ qt_add_executable(mainwindow mainwindow.cpp mainwindow.h toolbar.cpp toolbar.h ) + set_target_properties(mainwindow PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) + target_link_libraries(mainwindow PUBLIC Qt::Core Qt::Gui Qt::Widgets ) - # Resources: set(mainwindow_resource_files "qt.png" diff --git a/examples/widgets/mainwindows/mdi/CMakeLists.txt b/examples/widgets/mainwindows/mdi/CMakeLists.txt index 7a2efef80f..ce72767f1c 100644 --- a/examples/widgets/mainwindows/mdi/CMakeLists.txt +++ b/examples/widgets/mainwindows/mdi/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") + set(INSTALL_EXAMPLESDIR "examples") endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mdi") @@ -20,17 +20,18 @@ qt_add_executable(mdi mainwindow.cpp mainwindow.h mdichild.cpp mdichild.h ) + set_target_properties(mdi PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) + target_link_libraries(mdi PUBLIC Qt::Core Qt::Gui Qt::Widgets ) - # Resources: set(mdi_resource_files "images/copy.png" diff --git a/examples/widgets/mainwindows/menus/CMakeLists.txt b/examples/widgets/mainwindows/menus/CMakeLists.txt index ee5eb4e616..61ccd76f16 100644 --- a/examples/widgets/mainwindows/menus/CMakeLists.txt +++ b/examples/widgets/mainwindows/menus/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") + set(INSTALL_EXAMPLESDIR "examples") endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/menus") @@ -19,10 +19,12 @@ qt_add_executable(menus main.cpp mainwindow.cpp mainwindow.h ) + set_target_properties(menus PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) + target_link_libraries(menus PUBLIC Qt::Core Qt::Gui diff --git a/examples/widgets/mainwindows/sdi/CMakeLists.txt b/examples/widgets/mainwindows/sdi/CMakeLists.txt index 89b3228293..616f096edf 100644 --- a/examples/widgets/mainwindows/sdi/CMakeLists.txt +++ b/examples/widgets/mainwindows/sdi/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") + set(INSTALL_EXAMPLESDIR "examples") endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/sdi") @@ -19,17 +19,18 @@ qt_add_executable(sdi main.cpp mainwindow.cpp mainwindow.h ) + set_target_properties(sdi PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) + target_link_libraries(sdi PUBLIC Qt::Core Qt::Gui Qt::Widgets ) - # Resources: set(sdi_resource_files "images/copy.png" |