diff options
Diffstat (limited to 'examples/widgets')
166 files changed, 3868 insertions, 3003 deletions
diff --git a/examples/widgets/animation/animatedtiles/CMakeLists.txt b/examples/widgets/animation/animatedtiles/CMakeLists.txt index 0af95adcf8..dacde5535c 100644 --- a/examples/widgets/animation/animatedtiles/CMakeLists.txt +++ b/examples/widgets/animation/animatedtiles/CMakeLists.txt @@ -1,26 +1,27 @@ # Generated from animatedtiles.pro. -##################################################################### -## animatedtiles Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(animatedtiles LANGUAGES CXX) -add_qt_executable(animatedtiles - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/animatedtiles" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/animatedtiles" - SOURCES - main.cpp - 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(animatedtiles "animatedtiles" FILES - images/Time-For-Lunch-2.jpg - images/centered.png - images/ellipse.png - images/figure8.png - images/kinetic.png - images/random.png - images/tile.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(animatedtiles WIN32 MACOSX_BUNDLE + animatedtiles.qrc + main.cpp +) +target_link_libraries(animatedtiles PUBLIC + Qt::Widgets +) + +install(TARGETS animatedtiles + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/easing/CMakeLists.txt b/examples/widgets/animation/easing/CMakeLists.txt index b7444412a6..1500b11f3b 100644 --- a/examples/widgets/animation/easing/CMakeLists.txt +++ b/examples/widgets/animation/easing/CMakeLists.txt @@ -1,25 +1,30 @@ # Generated from easing.pro. -##################################################################### -## easing Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(easing LANGUAGES CXX) -add_qt_executable(easing - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/easing" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/easing" - SOURCES - animation.h - form.ui - main.cpp - window.cpp window.h - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -# Resources: -add_qt_resource(easing "easing" FILES - images/qt-logo.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(easing WIN32 MACOSX_BUNDLE + animation.h + easing.qrc + form.ui + main.cpp + window.cpp window.h +) +target_link_libraries(easing PUBLIC + Qt::Widgets +) + +install(TARGETS easing + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/moveblocks/CMakeLists.txt b/examples/widgets/animation/moveblocks/CMakeLists.txt index 5cbb8f4936..cc2b70af44 100644 --- a/examples/widgets/animation/moveblocks/CMakeLists.txt +++ b/examples/widgets/animation/moveblocks/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from moveblocks.pro. -##################################################################### -## moveblocks Binary: -##################################################################### - -add_qt_executable(moveblocks - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/moveblocks" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/moveblocks" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(moveblocks LANGUAGES CXX) + +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(moveblocks WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(moveblocks PUBLIC + Qt::Widgets +) + +install(TARGETS moveblocks + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/animation/states/CMakeLists.txt b/examples/widgets/animation/states/CMakeLists.txt index 52a9357789..a28995db99 100644 --- a/examples/widgets/animation/states/CMakeLists.txt +++ b/examples/widgets/animation/states/CMakeLists.txt @@ -1,25 +1,27 @@ # Generated from states.pro. -##################################################################### -## states Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(states LANGUAGES CXX) -add_qt_executable(states - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/states" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/states" - SOURCES - main.cpp - 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(states "states" FILES - accessories-dictionary.png - akregator.png - digikam.png - help-browser.png - k3b.png - kchart.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(states WIN32 MACOSX_BUNDLE + main.cpp + states.qrc +) +target_link_libraries(states PUBLIC + Qt::Widgets +) + +install(TARGETS states + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/stickman/CMakeLists.txt b/examples/widgets/animation/stickman/CMakeLists.txt index f604598232..5cb2e86c48 100644 --- a/examples/widgets/animation/stickman/CMakeLists.txt +++ b/examples/widgets/animation/stickman/CMakeLists.txt @@ -1,29 +1,32 @@ # Generated from stickman.pro. -##################################################################### -## stickman Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(stickman LANGUAGES CXX) -add_qt_executable(stickman - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/stickman" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/stickman" - SOURCES - animation.cpp animation.h - graphicsview.cpp graphicsview.h - lifecycle.cpp lifecycle.h - main.cpp - node.cpp node.h - rectbutton.cpp rectbutton.h - stickman.cpp stickman.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(stickman "stickman" FILES - animations/chilling.bin - animations/dancing.bin - animations/dead.bin - animations/jumping.bin) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(stickman WIN32 MACOSX_BUNDLE + animation.cpp animation.h + graphicsview.cpp graphicsview.h + lifecycle.cpp lifecycle.h + main.cpp + node.cpp node.h + rectbutton.cpp rectbutton.h + stickman.cpp stickman.h stickman.qrc +) +target_link_libraries(stickman PUBLIC + Qt::Widgets +) + +install(TARGETS stickman + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/sub-attaq/CMakeLists.txt b/examples/widgets/animation/sub-attaq/CMakeLists.txt index e7cb602e19..3260a5f75d 100644 --- a/examples/widgets/animation/sub-attaq/CMakeLists.txt +++ b/examples/widgets/animation/sub-attaq/CMakeLists.txt @@ -1,142 +1,43 @@ # Generated from sub-attaq.pro. -##################################################################### -## sub-attaq Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(sub-attaq LANGUAGES CXX) -add_qt_executable(sub-attaq - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/sub-attaq" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/sub-attaq" - SOURCES - animationmanager.cpp animationmanager.h - boat.cpp boat.h boat_p.h - bomb.cpp bomb.h - graphicsscene.cpp graphicsscene.h - main.cpp - mainwindow.cpp mainwindow.h - pixmapitem.cpp pixmapitem.h - progressitem.cpp progressitem.h - qanimationstate.cpp qanimationstate.h - states.cpp states.h - submarine.cpp submarine.h submarine_p.h - textinformationitem.cpp textinformationitem.h - torpedo.cpp torpedo.h - LIBRARIES - Qt::Widgets -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -# Resources: -set_source_files_properties("pics/big/background.png" - PROPERTIES alias "big/background") -set_source_files_properties("pics/big/boat.png" - PROPERTIES alias "big/boat") -set_source_files_properties("pics/big/bomb.png" - PROPERTIES alias "big/bomb") -set_source_files_properties("pics/big/explosion/boat/step1.png" - PROPERTIES alias "big/explosion/boat/step1") -set_source_files_properties("pics/big/explosion/boat/step2.png" - PROPERTIES alias "big/explosion/boat/step2") -set_source_files_properties("pics/big/explosion/boat/step3.png" - PROPERTIES alias "big/explosion/boat/step3") -set_source_files_properties("pics/big/explosion/boat/step4.png" - PROPERTIES alias "big/explosion/boat/step4") -set_source_files_properties("pics/big/explosion/submarine/step1.png" - PROPERTIES alias "big/explosion/submarine/step1") -set_source_files_properties("pics/big/explosion/submarine/step2.png" - PROPERTIES alias "big/explosion/submarine/step2") -set_source_files_properties("pics/big/explosion/submarine/step3.png" - PROPERTIES alias "big/explosion/submarine/step3") -set_source_files_properties("pics/big/explosion/submarine/step4.png" - PROPERTIES alias "big/explosion/submarine/step4") -set_source_files_properties("pics/big/submarine.png" - PROPERTIES alias "big/submarine") -set_source_files_properties("pics/big/surface.png" - PROPERTIES alias "big/surface") -set_source_files_properties("pics/big/torpedo.png" - PROPERTIES alias "big/torpedo") -set_source_files_properties("pics/scalable/boat.svg" - PROPERTIES alias "boat") -set_source_files_properties("pics/scalable/sub-attaq.svg" - PROPERTIES alias "all") -set_source_files_properties("pics/scalable/submarine.svg" - PROPERTIES alias "submarine") -set_source_files_properties("pics/scalable/torpedo.svg" - PROPERTIES alias "torpedo") -set_source_files_properties("pics/small/background.png" - PROPERTIES alias "small/background") -set_source_files_properties("pics/small/boat.png" - PROPERTIES alias "small/boat") -set_source_files_properties("pics/small/bomb.png" - PROPERTIES alias "small/bomb") -set_source_files_properties("pics/small/submarine.png" - PROPERTIES alias "small/submarine") -set_source_files_properties("pics/small/surface.png" - PROPERTIES alias "small/surface") -set_source_files_properties("pics/small/torpedo.png" - PROPERTIES alias "small/torpedo") -set_source_files_properties("pics/welcome/logo-a.png" - PROPERTIES alias "logo-a") -set_source_files_properties("pics/welcome/logo-a2.png" - PROPERTIES alias "logo-a2") -set_source_files_properties("pics/welcome/logo-b.png" - PROPERTIES alias "logo-b") -set_source_files_properties("pics/welcome/logo-dash.png" - PROPERTIES alias "logo-dash") -set_source_files_properties("pics/welcome/logo-excl.png" - PROPERTIES alias "logo-excl") -set_source_files_properties("pics/welcome/logo-q.png" - PROPERTIES alias "logo-q") -set_source_files_properties("pics/welcome/logo-s.png" - PROPERTIES alias "logo-s") -set_source_files_properties("pics/welcome/logo-t.png" - PROPERTIES alias "logo-t") -set_source_files_properties("pics/welcome/logo-t2.png" - PROPERTIES alias "logo-t2") -set_source_files_properties("pics/welcome/logo-u.png" - PROPERTIES alias "logo-u") -add_qt_resource(sub-attaq "subattaq" PREFIX "/" FILES - data.xml - pics/big/background.png - pics/big/boat.png - pics/big/bomb.png - pics/big/explosion/boat/step1.png - pics/big/explosion/boat/step2.png - pics/big/explosion/boat/step3.png - pics/big/explosion/boat/step4.png - pics/big/explosion/submarine/step1.png - pics/big/explosion/submarine/step2.png - pics/big/explosion/submarine/step3.png - pics/big/explosion/submarine/step4.png - pics/big/submarine.png - pics/big/surface.png - pics/big/torpedo.png - pics/scalable/boat.svg - pics/scalable/sub-attaq.svg - pics/scalable/submarine.svg - pics/scalable/torpedo.svg - pics/small/background.png - pics/small/boat.png - pics/small/bomb.png - pics/small/submarine.png - pics/small/surface.png - pics/small/torpedo.png - pics/welcome/logo-a.png - pics/welcome/logo-a2.png - pics/welcome/logo-b.png - pics/welcome/logo-dash.png - pics/welcome/logo-excl.png - pics/welcome/logo-q.png - pics/welcome/logo-s.png - pics/welcome/logo-t.png - pics/welcome/logo-t2.png - pics/welcome/logo-u.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS OpenGL) # special case -## Scopes: -##################################################################### +add_executable(sub-attaq WIN32 MACOSX_BUNDLE + animationmanager.cpp animationmanager.h + boat.cpp boat.h boat_p.h + bomb.cpp bomb.h + graphicsscene.cpp graphicsscene.h + main.cpp + mainwindow.cpp mainwindow.h + pixmapitem.cpp pixmapitem.h + progressitem.cpp progressitem.h + qanimationstate.cpp qanimationstate.h + states.cpp states.h + subattaq.qrc + submarine.cpp submarine.h submarine_p.h + textinformationitem.cpp textinformationitem.h + torpedo.cpp torpedo.h +) +target_link_libraries(sub-attaq PUBLIC + Qt::Widgets +) +if (TARGET Qt::OpenGL) + target_link_libraries(sub-attaq PUBLIC Qt::OpenGL) +endif() -extend_target(sub-attaq CONDITION TARGET Qt::OpenGL - LIBRARIES - Qt::OpenGL +install(TARGETS sub-attaq + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/desktop/screenshot/CMakeLists.txt b/examples/widgets/desktop/screenshot/CMakeLists.txt index 1956e3800e..e4533298d0 100644 --- a/examples/widgets/desktop/screenshot/CMakeLists.txt +++ b/examples/widgets/desktop/screenshot/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from screenshot.pro. -##################################################################### -## screenshot Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(screenshot LANGUAGES CXX) -add_qt_executable(screenshot - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/desktop/screenshot" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/desktop/screenshot" - SOURCES - main.cpp - screenshot.cpp screenshot.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(screenshot WIN32 MACOSX_BUNDLE + main.cpp + screenshot.cpp screenshot.h +) +target_link_libraries(screenshot PUBLIC + Qt::Widgets +) + +install(TARGETS screenshot + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/desktop/systray/CMakeLists.txt b/examples/widgets/desktop/systray/CMakeLists.txt index 9f5d05e751..2e89c2a8f9 100644 --- a/examples/widgets/desktop/systray/CMakeLists.txt +++ b/examples/widgets/desktop/systray/CMakeLists.txt @@ -1,23 +1,28 @@ # Generated from systray.pro. -##################################################################### -## systray Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(systray LANGUAGES CXX) -add_qt_executable(systray - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/desktop/systray" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/desktop/systray" - SOURCES - main.cpp - window.cpp window.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(systray "systray" PREFIX "/" FILES - images/bad.png - images/heart.png - images/trash.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(systray WIN32 MACOSX_BUNDLE + main.cpp + systray.qrc + window.cpp window.h +) +target_link_libraries(systray PUBLIC + Qt::Widgets +) + +install(TARGETS systray + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/dialogs/classwizard/CMakeLists.txt b/examples/widgets/dialogs/classwizard/CMakeLists.txt index 6d1cf9bab8..1c9ecebcee 100644 --- a/examples/widgets/dialogs/classwizard/CMakeLists.txt +++ b/examples/widgets/dialogs/classwizard/CMakeLists.txt @@ -1,27 +1,27 @@ # Generated from classwizard.pro. -##################################################################### -## classwizard Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(classwizard LANGUAGES CXX) -add_qt_executable(classwizard - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/classwizard" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/classwizard" - SOURCES - classwizard.cpp classwizard.h - main.cpp - 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(classwizard "classwizard" FILES - images/background.png - images/banner.png - images/logo1.png - images/logo2.png - images/logo3.png - images/watermark1.png - images/watermark2.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(classwizard WIN32 MACOSX_BUNDLE + classwizard.cpp classwizard.h classwizard.qrc + main.cpp +) +target_link_libraries(classwizard PUBLIC + Qt::Widgets +) + +install(TARGETS classwizard + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/dialogs/extension/CMakeLists.txt b/examples/widgets/dialogs/extension/CMakeLists.txt index 400cf23989..8037d670d9 100644 --- a/examples/widgets/dialogs/extension/CMakeLists.txt +++ b/examples/widgets/dialogs/extension/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from extension.pro. -##################################################################### -## extension Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(extension LANGUAGES CXX) -add_qt_executable(extension - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/extension" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/extension" - SOURCES - finddialog.cpp finddialog.h - main.cpp - 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(extension WIN32 MACOSX_BUNDLE + finddialog.cpp finddialog.h + main.cpp +) +target_link_libraries(extension PUBLIC + Qt::Widgets +) + +install(TARGETS extension + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/dialogs/findfiles/CMakeLists.txt b/examples/widgets/dialogs/findfiles/CMakeLists.txt index 26442a71b1..11e971b7f2 100644 --- a/examples/widgets/dialogs/findfiles/CMakeLists.txt +++ b/examples/widgets/dialogs/findfiles/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from findfiles.pro. -##################################################################### -## findfiles Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(findfiles LANGUAGES CXX) -add_qt_executable(findfiles - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/findfiles" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/findfiles" - SOURCES - main.cpp - window.cpp window.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(findfiles WIN32 MACOSX_BUNDLE + main.cpp + window.cpp window.h +) +target_link_libraries(findfiles PUBLIC + Qt::Widgets +) + +install(TARGETS findfiles + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt index 78b8cb7f51..eef8e33ca1 100644 --- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt +++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt @@ -1,23 +1,29 @@ # Generated from licensewizard.pro. -##################################################################### -## licensewizard Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(licensewizard LANGUAGES CXX) -add_qt_executable(licensewizard - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/licensewizard" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/licensewizard" - SOURCES - licensewizard.cpp licensewizard.h - main.cpp - LIBRARIES - Qt::Widgets - Qt::PrintSupport -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -# Resources: -add_qt_resource(licensewizard "licensewizard" FILES - images/logo.png - images/watermark.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS PrintSupport) + +add_executable(licensewizard WIN32 MACOSX_BUNDLE + licensewizard.cpp licensewizard.h licensewizard.qrc + main.cpp +) +target_link_libraries(licensewizard PUBLIC + Qt::PrintSupport + Qt::Widgets +) + +install(TARGETS licensewizard + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt index 3c0ddc0199..2aa96fba06 100644 --- a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt +++ b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from standarddialogs.pro. -##################################################################### -## standarddialogs Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(standarddialogs LANGUAGES CXX) -add_qt_executable(standarddialogs - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/standarddialogs" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/standarddialogs" - SOURCES - dialog.cpp dialog.h - main.cpp - 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(standarddialogs WIN32 MACOSX_BUNDLE + dialog.cpp dialog.h + main.cpp +) +target_link_libraries(standarddialogs PUBLIC + Qt::Widgets +) + +install(TARGETS standarddialogs + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/dialogs/tabdialog/CMakeLists.txt b/examples/widgets/dialogs/tabdialog/CMakeLists.txt index a8cbbb4b4e..da05a322f3 100644 --- a/examples/widgets/dialogs/tabdialog/CMakeLists.txt +++ b/examples/widgets/dialogs/tabdialog/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from tabdialog.pro. -##################################################################### -## tabdialog Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(tabdialog LANGUAGES CXX) -add_qt_executable(tabdialog - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/tabdialog" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/tabdialog" - SOURCES - main.cpp - tabdialog.cpp tabdialog.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(tabdialog WIN32 MACOSX_BUNDLE + main.cpp + tabdialog.cpp tabdialog.h +) +target_link_libraries(tabdialog PUBLIC + Qt::Widgets +) + +install(TARGETS tabdialog + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt index 2deae77c0d..307945b2c2 100644 --- a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt +++ b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from trivialwizard.pro. -##################################################################### -## trivialwizard Binary: -##################################################################### - -add_qt_executable(trivialwizard - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/trivialwizard" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/trivialwizard" - SOURCES - trivialwizard.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(trivialwizard LANGUAGES CXX) + +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(trivialwizard WIN32 MACOSX_BUNDLE + trivialwizard.cpp +) +target_link_libraries(trivialwizard PUBLIC + Qt::Widgets +) + +install(TARGETS trivialwizard + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt index 62a7be0cef..ced583e1db 100644 --- a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt +++ b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt @@ -1,23 +1,28 @@ # Generated from draggableicons.pro. -##################################################################### -## draggableicons Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(draggableicons LANGUAGES CXX) -add_qt_executable(draggableicons - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggableicons" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggableicons" - SOURCES - dragwidget.cpp dragwidget.h - main.cpp - 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(draggableicons "draggableicons" FILES - images/boat.png - images/car.png - images/house.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(draggableicons WIN32 MACOSX_BUNDLE + draggableicons.qrc + dragwidget.cpp dragwidget.h + main.cpp +) +target_link_libraries(draggableicons PUBLIC + Qt::Widgets +) + +install(TARGETS draggableicons + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt index 96ec5feff6..aa6656ed0b 100644 --- a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt +++ b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt @@ -1,21 +1,28 @@ # Generated from draggabletext.pro. -##################################################################### -## draggabletext Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(draggabletext LANGUAGES CXX) -add_qt_executable(draggabletext - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggabletext" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggabletext" - SOURCES - dragwidget.cpp dragwidget.h - main.cpp - 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(draggabletext "draggabletext" PREFIX "/dictionary" FILES - words.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(draggabletext WIN32 MACOSX_BUNDLE + draggabletext.qrc + dragwidget.cpp dragwidget.h + main.cpp +) +target_link_libraries(draggabletext PUBLIC + Qt::Widgets +) + +install(TARGETS draggabletext + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/draganddrop/dropsite/CMakeLists.txt b/examples/widgets/draganddrop/dropsite/CMakeLists.txt index 0d54133750..abb850c0b6 100644 --- a/examples/widgets/draganddrop/dropsite/CMakeLists.txt +++ b/examples/widgets/draganddrop/dropsite/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from dropsite.pro. -##################################################################### -## dropsite Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(dropsite LANGUAGES CXX) -add_qt_executable(dropsite - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/dropsite" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/dropsite" - SOURCES - droparea.cpp droparea.h - dropsitewindow.cpp dropsitewindow.h - main.cpp - 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(dropsite WIN32 MACOSX_BUNDLE + droparea.cpp droparea.h + dropsitewindow.cpp dropsitewindow.h + main.cpp +) +target_link_libraries(dropsite PUBLIC + Qt::Widgets +) + +install(TARGETS dropsite + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt index fcd7f3da15..e0ab3d36c5 100644 --- a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt +++ b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt @@ -1,22 +1,29 @@ # Generated from fridgemagnets.pro. -##################################################################### -## fridgemagnets Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(fridgemagnets LANGUAGES CXX) -add_qt_executable(fridgemagnets - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/fridgemagnets" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/fridgemagnets" - SOURCES - draglabel.cpp draglabel.h - dragwidget.cpp dragwidget.h - main.cpp - 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(fridgemagnets "fridgemagnets" PREFIX "/dictionary" FILES - words.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(fridgemagnets WIN32 MACOSX_BUNDLE + draglabel.cpp draglabel.h + dragwidget.cpp dragwidget.h + fridgemagnets.qrc + main.cpp +) +target_link_libraries(fridgemagnets PUBLIC + Qt::Widgets +) + +install(TARGETS fridgemagnets + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/draganddrop/puzzle/CMakeLists.txt b/examples/widgets/draganddrop/puzzle/CMakeLists.txt index 2622dd068e..b95d7b2cf4 100644 --- a/examples/widgets/draganddrop/puzzle/CMakeLists.txt +++ b/examples/widgets/draganddrop/puzzle/CMakeLists.txt @@ -1,26 +1,30 @@ # Generated from puzzle.pro. -##################################################################### -## puzzle Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(puzzle LANGUAGES CXX) -add_qt_executable(puzzle - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/puzzle" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/puzzle" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - pieceslist.cpp pieceslist.h - puzzlewidget.cpp puzzlewidget.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") -# Resources: -add_qt_resource(puzzle "puzzle" PREFIX "/images" FILES - example.jpg) +find_package(Qt5 COMPONENTS Widgets) +add_executable(draganddrop_puzzle WIN32 MACOSX_BUNDLE # special case: renamed puzzle + main.cpp + mainwindow.cpp mainwindow.h + pieceslist.cpp pieceslist.h + puzzle.qrc + puzzlewidget.cpp puzzlewidget.h +) +target_link_libraries(draganddrop_puzzle PUBLIC # special case: renamed puzzle + Qt::Widgets +) -#### Keys ignored in scope 1:.:puzzle.pro:<NONE>: -# QMAKE_PROJECT_NAME = "dndpuzzle" +install(TARGETS draganddrop_puzzle # special case: renamed puzzle + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/effects/blurpicker/CMakeLists.txt b/examples/widgets/effects/blurpicker/CMakeLists.txt index f534c47102..c99beb310f 100644 --- a/examples/widgets/effects/blurpicker/CMakeLists.txt +++ b/examples/widgets/effects/blurpicker/CMakeLists.txt @@ -1,30 +1,28 @@ # Generated from blurpicker.pro. -##################################################################### -## blurpicker Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(blurpicker LANGUAGES CXX) -add_qt_executable(blurpicker - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/effects/blurpicker" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/effects/blurpicker" - SOURCES - blureffect.cpp blureffect.h - blurpicker.cpp blurpicker.h - main.cpp - 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(blurpicker "blurpicker" PREFIX "/" FILES - images/accessories-calculator.png - images/accessories-text-editor.png - images/background.jpg - images/help-browser.png - images/internet-group-chat.png - images/internet-mail.png - images/internet-web-browser.png - images/office-calendar.png - images/system-users.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(blurpicker WIN32 MACOSX_BUNDLE + blureffect.cpp blureffect.h + blurpicker.cpp blurpicker.h blurpicker.qrc + main.cpp +) +target_link_libraries(blurpicker PUBLIC + Qt::Widgets +) + +install(TARGETS blurpicker + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/effects/fademessage/CMakeLists.txt b/examples/widgets/effects/fademessage/CMakeLists.txt index 838a10022e..689b0593ea 100644 --- a/examples/widgets/effects/fademessage/CMakeLists.txt +++ b/examples/widgets/effects/fademessage/CMakeLists.txt @@ -1,21 +1,27 @@ # Generated from fademessage.pro. -##################################################################### -## fademessage Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(fademessage LANGUAGES CXX) -add_qt_executable(fademessage - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/effects/fademessage" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/effects/fademessage" - SOURCES - fademessage.cpp fademessage.h - main.cpp - 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(fademessage "fademessage" PREFIX "/" FILES - background.jpg) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(fademessage WIN32 MACOSX_BUNDLE + fademessage.cpp fademessage.h fademessage.qrc + main.cpp +) +target_link_libraries(fademessage PUBLIC + Qt::Widgets +) + +install(TARGETS fademessage + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/gestures/imagegestures/CMakeLists.txt b/examples/widgets/gestures/imagegestures/CMakeLists.txt index 4862654314..1efaa42774 100644 --- a/examples/widgets/gestures/imagegestures/CMakeLists.txt +++ b/examples/widgets/gestures/imagegestures/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from imagegestures.pro. -##################################################################### -## imagegestures Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(imagegestures LANGUAGES CXX) -add_qt_executable(imagegestures - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/gestures/imagegestures" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/gestures/imagegestures" - SOURCES - imagewidget.cpp imagewidget.h - main.cpp - mainwidget.cpp mainwidget.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(imagegestures WIN32 MACOSX_BUNDLE + imagewidget.cpp imagewidget.h + main.cpp + mainwidget.cpp mainwidget.h +) +target_link_libraries(imagegestures PUBLIC + Qt::Widgets +) + +install(TARGETS imagegestures + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt index 8149f96784..1488f394c6 100644 --- a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt +++ b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from anchorlayout.pro. -##################################################################### -## anchorlayout Binary: -##################################################################### - -add_qt_executable(anchorlayout - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/anchorlayout" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/anchorlayout" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(anchorlayout LANGUAGES CXX) + +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(anchorlayout WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(anchorlayout PUBLIC + Qt::Widgets +) + +install(TARGETS anchorlayout + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt index d285a35ecc..0ce632e6b6 100644 --- a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt +++ b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt @@ -1,22 +1,29 @@ # Generated from basicgraphicslayouts.pro. -##################################################################### -## basicgraphicslayouts Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(basicgraphicslayouts LANGUAGES CXX) -add_qt_executable(basicgraphicslayouts - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/basicgraphicslayouts" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/basicgraphicslayouts" - SOURCES - layoutitem.cpp layoutitem.h - main.cpp - window.cpp window.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(basicgraphicslayouts "basicgraphicslayouts" FILES - images/block.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(basicgraphicslayouts WIN32 MACOSX_BUNDLE + basicgraphicslayouts.qrc + layoutitem.cpp layoutitem.h + main.cpp + window.cpp window.h +) +target_link_libraries(basicgraphicslayouts PUBLIC + Qt::Widgets +) + +install(TARGETS basicgraphicslayouts + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/graphicsview/boxes/CMakeLists.txt b/examples/widgets/graphicsview/boxes/CMakeLists.txt index 11331b1906..4e1d105a3a 100644 --- a/examples/widgets/graphicsview/boxes/CMakeLists.txt +++ b/examples/widgets/graphicsview/boxes/CMakeLists.txt @@ -1,52 +1,38 @@ # Generated from boxes.pro. -##################################################################### -## boxes Binary: -##################################################################### - -add_qt_executable(boxes - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/boxes" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/boxes" - SOURCES - 3rdparty/fbm.c 3rdparty/fbm.h - glbuffers.cpp glbuffers.h - glextensions.cpp glextensions.h - gltrianglemesh.h - main.cpp - qtbox.cpp qtbox.h - roundedbox.cpp roundedbox.h - scene.cpp scene.h - trackball.cpp trackball.h - LIBRARIES - Qt::OpenGL - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(boxes LANGUAGES CXX) + +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 OpenGL) +find_package(Qt5 COMPONENTS Widgets) + + +add_executable(boxes WIN32 MACOSX_BUNDLE + 3rdparty/fbm.c 3rdparty/fbm.h + boxes.qrc + glbuffers.cpp glbuffers.h + glextensions.cpp glextensions.h + gltrianglemesh.h + main.cpp + qtbox.cpp qtbox.h + roundedbox.cpp roundedbox.h + scene.cpp scene.h + trackball.cpp trackball.h +) +target_link_libraries(boxes PUBLIC + Qt::OpenGL + Qt::Widgets ) -# Resources: -add_qt_resource(boxes "boxes" PREFIX "/res/boxes" FILES - basic.fsh - basic.vsh - cubemap_negx.jpg - cubemap_negy.jpg - cubemap_negz.jpg - cubemap_posx.jpg - cubemap_posy.jpg - cubemap_posz.jpg - dotted.fsh - fresnel.fsh - glass.fsh - granite.fsh - marble.fsh - parameters.par - qt-logo.jpg - qt-logo.png - reflection.fsh - refraction.fsh - smiley.png - square.jpg - wood.fsh) - - -## Scopes: -##################################################################### +install(TARGETS boxes + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt index 566a8aae02..81f290be99 100644 --- a/examples/widgets/graphicsview/chip/CMakeLists.txt +++ b/examples/widgets/graphicsview/chip/CMakeLists.txt @@ -1,44 +1,38 @@ # Generated from chip.pro. -##################################################################### -## chip Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(chip LANGUAGES CXX) -add_qt_executable(chip - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/chip" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/chip" - SOURCES - chip.cpp chip.h - main.cpp - mainwindow.cpp mainwindow.h - view.cpp view.h - LIBRARIES - Qt::Widgets -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Resources: -add_qt_resource(chip "images" FILES - fileprint.png - qt4logo.png - rotateleft.png - rotateright.png - zoomin.png - zoomout.png) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS OpenGL) # special case +find_package(Qt5 COMPONENTS PrintSupport) # special case -extend_target(chip CONDITION TARGET Qt::PrintSupport - LIBRARIES - Qt::PrintSupport +add_executable(chip WIN32 MACOSX_BUNDLE + chip.cpp chip.h + images.qrc + main.cpp + mainwindow.cpp mainwindow.h + view.cpp view.h ) - -extend_target(chip CONDITION TARGET Qt::OpenGL - LIBRARIES - Qt::OpenGL +target_link_libraries(chip PUBLIC + Qt::Widgets +) +if (TARGET Qt::OpenGL) + target_link_libraries(chip PUBLIC Qt::OpenGL) +endif() +if (TARGET Qt::PrintSupport) + target_link_libraries(chip PUBLIC Qt::PrintSupport) +endif() + +install(TARGETS chip + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) - -#### Keys ignored in scope 4:.:chip.pro:build_all AND NOT build_pass: -# CONFIG = "-build_all" "release" diff --git a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt index 5455bec89e..36b1fb85c1 100644 --- a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt +++ b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt @@ -1,21 +1,28 @@ # Generated from collidingmice.pro. -##################################################################### -## collidingmice Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(collidingmice LANGUAGES CXX) -add_qt_executable(collidingmice - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/collidingmice" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/collidingmice" - SOURCES - main.cpp - mouse.cpp mouse.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(collidingmice "mice" PREFIX "/" FILES - images/cheese.jpg) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(collidingmice WIN32 MACOSX_BUNDLE + main.cpp + mice.qrc + mouse.cpp mouse.h +) +target_link_libraries(collidingmice PUBLIC + Qt::Widgets +) + +install(TARGETS collidingmice + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt index fb3ff6c712..76f60aabaa 100644 --- a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt +++ b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt @@ -1,39 +1,31 @@ # Generated from diagramscene.pro. -##################################################################### -## diagramscene Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(diagramscene LANGUAGES CXX) -add_qt_executable(diagramscene - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/diagramscene" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/diagramscene" - SOURCES - arrow.cpp arrow.h - diagramitem.cpp diagramitem.h - diagramscene.cpp diagramscene.h - diagramtextitem.cpp diagramtextitem.h - 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(diagramscene "diagramscene" FILES - images/background1.png - images/background2.png - images/background3.png - images/background4.png - images/bold.png - images/bringtofront.png - images/delete.png - images/floodfill.png - images/italic.png - images/linecolor.png - images/linepointer.png - images/pointer.png - images/sendtoback.png - images/textpointer.png - images/underline.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(diagramscene WIN32 MACOSX_BUNDLE + arrow.cpp arrow.h + diagramitem.cpp diagramitem.h + diagramscene.cpp diagramscene.h diagramscene.qrc + diagramtextitem.cpp diagramtextitem.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(diagramscene PUBLIC + Qt::Widgets +) + +install(TARGETS diagramscene + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt index 76932368e8..2adcff3ae5 100644 --- a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt +++ b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt @@ -1,22 +1,28 @@ # Generated from dragdroprobot.pro. -##################################################################### -## dragdroprobot Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(dragdroprobot LANGUAGES CXX) -add_qt_executable(dragdroprobot - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/dragdroprobot" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/dragdroprobot" - SOURCES - coloritem.cpp coloritem.h - main.cpp - robot.cpp robot.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(dragdroprobot "robot" PREFIX "/" FILES - images/head.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(dragdroprobot WIN32 MACOSX_BUNDLE + coloritem.cpp coloritem.h + main.cpp + robot.cpp robot.h robot.qrc +) +target_link_libraries(dragdroprobot PUBLIC + Qt::Widgets +) + +install(TARGETS dragdroprobot + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt index d1c10327b0..42fd71fa5f 100644 --- a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt +++ b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt @@ -1,18 +1,29 @@ # Generated from elasticnodes.pro. -##################################################################### -## elasticnodes Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(elasticnodes LANGUAGES CXX) -add_qt_executable(elasticnodes - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/elasticnodes" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/elasticnodes" - SOURCES - edge.cpp edge.h - graphwidget.cpp graphwidget.h - main.cpp - node.cpp node.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(elasticnodes WIN32 MACOSX_BUNDLE + edge.cpp edge.h + graphwidget.cpp graphwidget.h + main.cpp + node.cpp node.h +) +target_link_libraries(elasticnodes PUBLIC + Qt::Widgets +) + +install(TARGETS elasticnodes + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt index dda61e0f68..2652b985df 100644 --- a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt +++ b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt @@ -1,30 +1,29 @@ # Generated from embeddeddialogs.pro. -##################################################################### -## embeddeddialogs Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(embeddeddialogs LANGUAGES CXX) -add_qt_executable(embeddeddialogs - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/embeddeddialogs" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/embeddeddialogs" - SOURCES - customproxy.cpp customproxy.h - embeddeddialog.cpp embeddeddialog.h embeddeddialog.ui - main.cpp - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Resources: -add_qt_resource(embeddeddialogs "embeddeddialogs" FILES - No-Ones-Laughing-3.jpg) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) -#### Keys ignored in scope 2:.:.:embeddeddialogs.pro:build_all AND NOT build_pass: -# CONFIG = "-build_all" "release" +add_executable(embeddeddialogs WIN32 MACOSX_BUNDLE + customproxy.cpp customproxy.h + embeddeddialog.cpp embeddeddialog.h embeddeddialog.ui + embeddeddialogs.qrc + main.cpp +) +target_link_libraries(embeddeddialogs PUBLIC + Qt::Widgets +) + +install(TARGETS embeddeddialogs + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt index 2d313ff700..96b82b7955 100644 --- a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt +++ b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt @@ -1,20 +1,28 @@ # Generated from flowlayout.pro. -##################################################################### -## flowlayout Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(flowlayout LANGUAGES CXX) -add_qt_executable(flowlayout - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/flowlayout" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/flowlayout" - SOURCES - flowlayout.cpp flowlayout.h - main.cpp - window.cpp window.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(graphicsview_flowlayout WIN32 MACOSX_BUNDLE # special case: renamed flowlayout + flowlayout.cpp flowlayout.h + main.cpp + window.cpp window.h +) +target_link_libraries(graphicsview_flowlayout PUBLIC # special case: renamed flowlayout + Qt::Widgets ) -#### Keys ignored in scope 1:.:flowlayout.pro:<NONE>: -# QMAKE_PROJECT_NAME = "flowlayout_graphicsview" +install(TARGETS graphicsview_flowlayout # special case: renamed flowlayout + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt new file mode 100644 index 0000000000..9c4282391e --- /dev/null +++ b/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt @@ -0,0 +1,45 @@ +# Generated from padnavigator.pro. + +##################################################################### +## padnavigator Binary: +##################################################################### + +add_qt_executable(padnavigator + OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator" + INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator" + SOURCES + flippablepad.cpp flippablepad.h + form.ui + main.cpp + padnavigator.cpp padnavigator.h + roundrectitem.cpp roundrectitem.h + splashitem.cpp splashitem.h + PUBLIC_LIBRARIES + Qt::Widgets + ENABLE_AUTOGEN_TOOLS + uic +) + +# Resources: +add_qt_resource(padnavigator "padnavigator" FILES + images/artsfftscope.png + images/blue_angle_swirl.jpg + images/kontact_contacts.png + images/kontact_journal.png + images/kontact_mail.png + images/kontact_notes.png + images/kopeteavailable.png + images/metacontact_online.png + images/minitools.png) + + +#### Keys ignored in scope 1:.:.:padnavigator.pro:<TRUE>: +# CONFIG = "console" + +## Scopes: +##################################################################### + +extend_target(padnavigator CONDITION TARGET Qt::OpenGL + PUBLIC_LIBRARIES + Qt::OpenGL +) diff --git a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt index 9c4282391e..e995f2a16e 100644 --- a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt +++ b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt @@ -1,45 +1,37 @@ # Generated from padnavigator.pro. -##################################################################### -## padnavigator Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(padnavigator LANGUAGES CXX) -add_qt_executable(padnavigator - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator" - SOURCES - flippablepad.cpp flippablepad.h - form.ui - main.cpp - padnavigator.cpp padnavigator.h - roundrectitem.cpp roundrectitem.h - splashitem.cpp splashitem.h - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Resources: -add_qt_resource(padnavigator "padnavigator" FILES - images/artsfftscope.png - images/blue_angle_swirl.jpg - images/kontact_contacts.png - images/kontact_journal.png - images/kontact_mail.png - images/kontact_notes.png - images/kopeteavailable.png - images/metacontact_online.png - images/minitools.png) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(INSTALL_EXAMPLEDIR "examples") -#### Keys ignored in scope 1:.:.:padnavigator.pro:<TRUE>: -# CONFIG = "console" +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS OpenGL) # special case -## Scopes: -##################################################################### +add_executable(padnavigator + flippablepad.cpp flippablepad.h + form.ui + main.cpp + padnavigator.cpp padnavigator.h padnavigator.qrc + roundrectitem.cpp roundrectitem.h + splashitem.cpp splashitem.h +) +target_link_libraries(padnavigator PUBLIC + Qt::Widgets +) +# special case begin +if (TARGET Qt::OpenGL) + target_link_libraries(padnavigator PUBLIC Qt::OpenGL) +endif() +# special case end -extend_target(padnavigator CONDITION TARGET Qt::OpenGL - PUBLIC_LIBRARIES - Qt::OpenGL +install(TARGETS padnavigator + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt index 87e4742b44..afb35675d8 100644 --- a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt +++ b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from simpleanchorlayout.pro. -##################################################################### -## simpleanchorlayout Binary: -##################################################################### - -add_qt_executable(simpleanchorlayout - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/simpleanchorlayout" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/simpleanchorlayout" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(simpleanchorlayout LANGUAGES CXX) + +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(simpleanchorlayout WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(simpleanchorlayout PUBLIC + Qt::Widgets +) + +install(TARGETS simpleanchorlayout + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt index 5a20bbdb2e..750352e325 100644 --- a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt +++ b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt @@ -1,25 +1,27 @@ # Generated from weatheranchorlayout.pro. -##################################################################### -## weatheranchorlayout Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(weatheranchorlayout LANGUAGES CXX) -add_qt_executable(weatheranchorlayout - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/weatheranchorlayout" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/weatheranchorlayout" - SOURCES - main.cpp - 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(weatheranchorlayout "weatheranchorlayout" FILES - images/5days.jpg - images/details.jpg - images/place.jpg - images/tabbar.jpg - images/title.jpg - images/weather-few-clouds.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(weatheranchorlayout WIN32 MACOSX_BUNDLE + main.cpp + weatheranchorlayout.qrc +) +target_link_libraries(weatheranchorlayout PUBLIC + Qt::Widgets +) + +install(TARGETS weatheranchorlayout + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/addressbook/CMakeLists.txt b/examples/widgets/itemviews/addressbook/CMakeLists.txt index cee0ef70e2..026c2406a4 100644 --- a/examples/widgets/itemviews/addressbook/CMakeLists.txt +++ b/examples/widgets/itemviews/addressbook/CMakeLists.txt @@ -1,20 +1,31 @@ # Generated from addressbook.pro. -##################################################################### -## addressbook Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(addressbook LANGUAGES CXX) -add_qt_executable(addressbook - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/addressbook" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/addressbook" - SOURCES - adddialog.cpp adddialog.h - addresswidget.cpp addresswidget.h - main.cpp - mainwindow.cpp mainwindow.h - newaddresstab.cpp newaddresstab.h - tablemodel.cpp tablemodel.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(addressbook WIN32 MACOSX_BUNDLE + adddialog.cpp adddialog.h + addresswidget.cpp addresswidget.h + main.cpp + mainwindow.cpp mainwindow.h + newaddresstab.cpp newaddresstab.h + tablemodel.cpp tablemodel.h +) +target_link_libraries(addressbook PUBLIC + Qt::Widgets +) + +install(TARGETS addressbook + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt index 6da9a73867..2efba58b10 100644 --- a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt +++ b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from basicsortfiltermodel.pro. -##################################################################### -## basicsortfiltermodel Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(basicsortfiltermodel LANGUAGES CXX) -add_qt_executable(basicsortfiltermodel - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/basicsortfiltermodel" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/basicsortfiltermodel" - SOURCES - main.cpp - window.cpp window.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(basicsortfiltermodel WIN32 MACOSX_BUNDLE + main.cpp + window.cpp window.h +) +target_link_libraries(basicsortfiltermodel PUBLIC + Qt::Widgets +) + +install(TARGETS basicsortfiltermodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/chart/CMakeLists.txt b/examples/widgets/itemviews/chart/CMakeLists.txt index 9d707d1ec6..79c489b03e 100644 --- a/examples/widgets/itemviews/chart/CMakeLists.txt +++ b/examples/widgets/itemviews/chart/CMakeLists.txt @@ -1,30 +1,29 @@ # Generated from chart.pro. -##################################################################### -## chart Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(chart LANGUAGES CXX) -add_qt_executable(chart - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/chart" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/chart" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - pieview.cpp pieview.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(chart "chart" PREFIX "/Charts" FILES - qtdata.cht) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) -## Scopes: -##################################################################### +add_executable(chart WIN32 MACOSX_BUNDLE + chart.qrc + main.cpp + mainwindow.cpp mainwindow.h + pieview.cpp pieview.h +) +target_link_libraries(chart PUBLIC + Qt::Widgets +) -extend_target(chart CONDITION UNIX AND NOT APPLE_OSX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS - LIBRARIES - m +install(TARGETS chart + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt index 317489e6e2..c33cc61118 100644 --- a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt +++ b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from coloreditorfactory.pro. -##################################################################### -## coloreditorfactory Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(coloreditorfactory LANGUAGES CXX) -add_qt_executable(coloreditorfactory - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/coloreditorfactory" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/coloreditorfactory" - SOURCES - colorlisteditor.cpp colorlisteditor.h - main.cpp - window.cpp window.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(coloreditorfactory WIN32 MACOSX_BUNDLE + colorlisteditor.cpp colorlisteditor.h + main.cpp + window.cpp window.h +) +target_link_libraries(coloreditorfactory PUBLIC + Qt::Widgets +) + +install(TARGETS coloreditorfactory + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt index 326df33ba2..7cce164bc6 100644 --- a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt +++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from combowidgetmapper.pro. -##################################################################### -## combowidgetmapper Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(combowidgetmapper LANGUAGES CXX) -add_qt_executable(combowidgetmapper - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/combowidgetmapper" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/combowidgetmapper" - SOURCES - main.cpp - window.cpp window.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(combowidgetmapper WIN32 MACOSX_BUNDLE + main.cpp + window.cpp window.h +) +target_link_libraries(combowidgetmapper PUBLIC + Qt::Widgets +) + +install(TARGETS combowidgetmapper + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt index 6cbfa84ae1..0aa34c46d8 100644 --- a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt +++ b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt @@ -1,23 +1,30 @@ # Generated from customsortfiltermodel.pro. -##################################################################### -## customsortfiltermodel Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(customsortfiltermodel LANGUAGES CXX) -add_qt_executable(customsortfiltermodel - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/customsortfiltermodel" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/customsortfiltermodel" - SOURCES - filterwidget.cpp filterwidget.h - main.cpp - mysortfilterproxymodel.cpp mysortfilterproxymodel.h - window.cpp window.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(customsortfiltermodel "customsortfiltermodel" PREFIX "/" FILES - images/find.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(customsortfiltermodel WIN32 MACOSX_BUNDLE + customsortfiltermodel.qrc + filterwidget.cpp filterwidget.h + main.cpp + mysortfilterproxymodel.cpp mysortfilterproxymodel.h + window.cpp window.h +) +target_link_libraries(customsortfiltermodel PUBLIC + Qt::Widgets +) + +install(TARGETS customsortfiltermodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/dirview/CMakeLists.txt b/examples/widgets/itemviews/dirview/CMakeLists.txt index 5ad3455249..3e6e7c9ac7 100644 --- a/examples/widgets/itemviews/dirview/CMakeLists.txt +++ b/examples/widgets/itemviews/dirview/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from dirview.pro. -##################################################################### -## dirview Binary: -##################################################################### - -add_qt_executable(dirview - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/dirview" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/dirview" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(dirview LANGUAGES CXX) + +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(dirview WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(dirview PUBLIC + Qt::Widgets +) + +install(TARGETS dirview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt index 9cb49e0a25..c86c0d7272 100644 --- a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt +++ b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt @@ -1,25 +1,30 @@ # Generated from editabletreemodel.pro. -##################################################################### -## editabletreemodel Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(editabletreemodel LANGUAGES CXX) -add_qt_executable(editabletreemodel - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/editabletreemodel" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/editabletreemodel" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h mainwindow.ui - treeitem.cpp treeitem.h - treemodel.cpp treemodel.h - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -# Resources: -add_qt_resource(editabletreemodel "editabletreemodel" PREFIX "/" FILES - default.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(editabletreemodel WIN32 MACOSX_BUNDLE + editabletreemodel.qrc + main.cpp + mainwindow.cpp mainwindow.h mainwindow.ui + treeitem.cpp treeitem.h + treemodel.cpp treemodel.h +) +target_link_libraries(editabletreemodel PUBLIC + Qt::Widgets +) + +install(TARGETS editabletreemodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/fetchmore/CMakeLists.txt b/examples/widgets/itemviews/fetchmore/CMakeLists.txt index d3f2578302..5013d5bab2 100644 --- a/examples/widgets/itemviews/fetchmore/CMakeLists.txt +++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from fetchmore.pro. -##################################################################### -## fetchmore Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(fetchmore LANGUAGES CXX) -add_qt_executable(fetchmore - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/fetchmore" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/fetchmore" - SOURCES - filelistmodel.cpp filelistmodel.h - main.cpp - window.cpp window.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(fetchmore WIN32 MACOSX_BUNDLE + filelistmodel.cpp filelistmodel.h + main.cpp + window.cpp window.h +) +target_link_libraries(fetchmore PUBLIC + Qt::Widgets +) + +install(TARGETS fetchmore + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/flattreeview/CMakeLists.txt b/examples/widgets/itemviews/flattreeview/CMakeLists.txt index c8bffce970..afcb66a6b2 100644 --- a/examples/widgets/itemviews/flattreeview/CMakeLists.txt +++ b/examples/widgets/itemviews/flattreeview/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from flattreeview.pro. -##################################################################### -## flattreeview Binary: -##################################################################### - -add_qt_executable(flattreeview - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/flattreeview" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/flattreeview" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(flattreeview LANGUAGES CXX) + +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(flattreeview WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(flattreeview PUBLIC + Qt::Widgets +) + +install(TARGETS flattreeview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt index 11e8a1e471..a17ffef5fc 100644 --- a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt +++ b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt @@ -1,21 +1,28 @@ # Generated from frozencolumn.pro. -##################################################################### -## frozencolumn Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(frozencolumn LANGUAGES CXX) -add_qt_executable(frozencolumn - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/frozencolumn" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/frozencolumn" - SOURCES - freezetablewidget.cpp freezetablewidget.h - main.cpp - 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(frozencolumn "grades" PREFIX "/" FILES - grades.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(frozencolumn WIN32 MACOSX_BUNDLE + freezetablewidget.cpp freezetablewidget.h + grades.qrc + main.cpp +) +target_link_libraries(frozencolumn PUBLIC + Qt::Widgets +) + +install(TARGETS frozencolumn + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/interview/CMakeLists.txt b/examples/widgets/itemviews/interview/CMakeLists.txt index d970348bc6..f14bded157 100644 --- a/examples/widgets/itemviews/interview/CMakeLists.txt +++ b/examples/widgets/itemviews/interview/CMakeLists.txt @@ -1,32 +1,28 @@ # Generated from interview.pro. -##################################################################### -## interview Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(interview LANGUAGES CXX) -add_qt_executable(interview - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/interview" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/interview" - SOURCES - main.cpp - model.cpp model.h - LIBRARIES - Qt::Widgets -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Resources: -add_qt_resource(interview "interview" PREFIX "/" FILES - images/folder.png - images/interview.png - images/services.png) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(INSTALL_EXAMPLEDIR "examples") -#### Keys ignored in scope 1:.:interview.pro:<NONE>: -# TEMPLATE = "app" +find_package(Qt5 COMPONENTS Widgets) -## Scopes: -##################################################################### +add_executable(interview WIN32 MACOSX_BUNDLE + interview.qrc + main.cpp + model.cpp model.h +) +target_link_libraries(interview PUBLIC + Qt::Widgets +) -#### Keys ignored in scope 2:.:interview.pro:build_all AND NOT build_pass: -# CONFIG = "-build_all" "release" +install(TARGETS interview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt index fc29cde3b1..e9a04a0807 100644 --- a/examples/widgets/itemviews/pixelator/CMakeLists.txt +++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt @@ -1,31 +1,36 @@ # Generated from pixelator.pro. -##################################################################### -## pixelator Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(pixelator LANGUAGES CXX) -add_qt_executable(pixelator - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/pixelator" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/pixelator" - SOURCES - imagemodel.cpp imagemodel.h - main.cpp - mainwindow.cpp mainwindow.h - pixeldelegate.cpp pixeldelegate.h - LIBRARIES - Qt::Widgets -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Resources: -add_qt_resource(pixelator "images" FILES - images/qt.png) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS PrintSupport) # special case -extend_target(pixelator CONDITION TARGET Qt::PrintSupport - LIBRARIES +add_executable(pixelator WIN32 MACOSX_BUNDLE + imagemodel.cpp imagemodel.h + images.qrc + main.cpp + mainwindow.cpp mainwindow.h + pixeldelegate.cpp pixeldelegate.h +) +target_link_libraries(pixelator PUBLIC + Qt::Widgets +) +if (TARGET Qt::PrintSupport) + target_link_libraries(pixelator PUBLIC Qt::PrintSupport + ) +endif() + +install(TARGETS pixelator + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/puzzle/CMakeLists.txt b/examples/widgets/itemviews/puzzle/CMakeLists.txt index a105278418..cffbdbb1b0 100644 --- a/examples/widgets/itemviews/puzzle/CMakeLists.txt +++ b/examples/widgets/itemviews/puzzle/CMakeLists.txt @@ -1,23 +1,30 @@ # Generated from puzzle.pro. -##################################################################### -## puzzle Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(puzzle LANGUAGES CXX) -add_qt_executable(puzzle_itemview # special case - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/puzzle" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/puzzle" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - piecesmodel.cpp piecesmodel.h - puzzlewidget.cpp puzzlewidget.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(puzzle_itemview "puzzle" PREFIX "/images" FILES # special case - example.jpg) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(itemviews_puzzle WIN32 MACOSX_BUNDLE # special case: renamed puzzle + main.cpp + mainwindow.cpp mainwindow.h + piecesmodel.cpp piecesmodel.h + puzzle.qrc + puzzlewidget.cpp puzzlewidget.h +) +target_link_libraries(itemviews_puzzle PUBLIC # special case: renamed puzzle + Qt::Widgets +) + +install(TARGETS itemviews_puzzle # special case: renamed puzzle + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt index 2514287049..4a1812d96d 100644 --- a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt +++ b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt @@ -1,19 +1,31 @@ # Generated from simpledommodel.pro. -##################################################################### -## simpledommodel Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(simpledommodel LANGUAGES CXX) -add_qt_executable(simpledommodel - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpledommodel" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpledommodel" - SOURCES - domitem.cpp domitem.h - dommodel.cpp dommodel.h - main.cpp - mainwindow.cpp mainwindow.h - LIBRARIES - Qt::Xml - 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 Xml) +find_package(Qt5 COMPONENTS Widgets) + +add_executable(simpledommodel WIN32 MACOSX_BUNDLE + domitem.cpp domitem.h + dommodel.cpp dommodel.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(simpledommodel PUBLIC + Qt::Widgets + Qt::Xml +) + +install(TARGETS simpledommodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt index 1b50a3508c..3fb889229d 100644 --- a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt +++ b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt @@ -1,22 +1,29 @@ # Generated from simpletreemodel.pro. -##################################################################### -## simpletreemodel Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(simpletreemodel LANGUAGES CXX) -add_qt_executable(simpletreemodel - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpletreemodel" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpletreemodel" - SOURCES - main.cpp - treeitem.cpp treeitem.h - treemodel.cpp treemodel.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(simpletreemodel "simpletreemodel" FILES - default.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(simpletreemodel WIN32 MACOSX_BUNDLE + main.cpp + simpletreemodel.qrc + treeitem.cpp treeitem.h + treemodel.cpp treemodel.h +) +target_link_libraries(simpletreemodel PUBLIC + Qt::Widgets +) + +install(TARGETS simpletreemodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt index 849f7e2969..d25d491544 100644 --- a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt +++ b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from simplewidgetmapper.pro. -##################################################################### -## simplewidgetmapper Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(simplewidgetmapper LANGUAGES CXX) -add_qt_executable(simplewidgetmapper - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simplewidgetmapper" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simplewidgetmapper" - SOURCES - main.cpp - window.cpp window.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(simplewidgetmapper WIN32 MACOSX_BUNDLE + main.cpp + window.cpp window.h +) +target_link_libraries(simplewidgetmapper PUBLIC + Qt::Widgets +) + +install(TARGETS simplewidgetmapper + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt index b8c24f591c..809c1cd0d0 100644 --- a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt +++ b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from spinboxdelegate.pro. -##################################################################### -## spinboxdelegate Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(spinboxdelegate LANGUAGES CXX) -add_qt_executable(spinboxdelegate - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spinboxdelegate" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spinboxdelegate" - SOURCES - delegate.cpp delegate.h - main.cpp - 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(spinboxdelegate WIN32 MACOSX_BUNDLE + delegate.cpp delegate.h + main.cpp +) +target_link_libraries(spinboxdelegate PUBLIC + Qt::Widgets +) + +install(TARGETS spinboxdelegate + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt index 498164c1cd..811caec6a6 100644 --- a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt +++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt @@ -1,35 +1,36 @@ # Generated from spreadsheet.pro. -##################################################################### -## spreadsheet Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(spreadsheet LANGUAGES CXX) -add_qt_executable(spreadsheet - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spreadsheet" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spreadsheet" - SOURCES - main.cpp - printview.cpp printview.h - spreadsheet.cpp spreadsheet.h - spreadsheetdelegate.cpp spreadsheetdelegate.h - spreadsheetitem.cpp spreadsheetitem.h - LIBRARIES - Qt::Widgets -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Resources: -add_qt_resource(spreadsheet "spreadsheet" PREFIX "/" FILES - images/interview.png) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS PrintSupport) # special case -extend_target(spreadsheet CONDITION TARGET Qt::PrintSupport - LIBRARIES - Qt::PrintSupport +add_executable(spreadsheet WIN32 MACOSX_BUNDLE + main.cpp + printview.cpp printview.h + spreadsheet.cpp spreadsheet.h spreadsheet.qrc + spreadsheetdelegate.cpp spreadsheetdelegate.h + spreadsheetitem.cpp spreadsheetitem.h +) +target_link_libraries(spreadsheet PUBLIC + Qt::Widgets ) +# special case begin +if (TARGET Qt::PrintSupport) + target_link_libraries(spreadsheet PUBLIC Qt::PrintSupport) +endif() +# special case end -#### Keys ignored in scope 3:.:spreadsheet.pro:build_all AND NOT build_pass: -# CONFIG = "-build_all" "release" +install(TARGETS spreadsheet + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/stardelegate/CMakeLists.txt b/examples/widgets/itemviews/stardelegate/CMakeLists.txt index 0b94a12fb6..8cfb991143 100644 --- a/examples/widgets/itemviews/stardelegate/CMakeLists.txt +++ b/examples/widgets/itemviews/stardelegate/CMakeLists.txt @@ -1,18 +1,29 @@ # Generated from stardelegate.pro. -##################################################################### -## stardelegate Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(stardelegate LANGUAGES CXX) -add_qt_executable(stardelegate - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/stardelegate" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/stardelegate" - SOURCES - main.cpp - stardelegate.cpp stardelegate.h - stareditor.cpp stareditor.h - starrating.cpp starrating.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(stardelegate WIN32 MACOSX_BUNDLE + main.cpp + stardelegate.cpp stardelegate.h + stareditor.cpp stareditor.h + starrating.cpp starrating.h +) +target_link_libraries(stardelegate PUBLIC + Qt::Widgets +) + +install(TARGETS stardelegate + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt index efad83e1a1..d25d839347 100644 --- a/examples/widgets/itemviews/storageview/CMakeLists.txt +++ b/examples/widgets/itemviews/storageview/CMakeLists.txt @@ -1,20 +1,31 @@ # Generated from storageview.pro. -##################################################################### -## storageview Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(storageview LANGUAGES CXX) -add_qt_executable(storageview - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/storageview" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/storageview" - SOURCES - main.cpp - storagemodel.cpp storagemodel.h - LIBRARIES - Qt::Gui - 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 Core) +find_package(Qt5 COMPONENTS Gui) +find_package(Qt5 COMPONENTS Widgets) + +add_executable(storageview WIN32 MACOSX_BUNDLE + main.cpp + storagemodel.cpp storagemodel.h +) +target_link_libraries(storageview PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets ) -#### Keys ignored in scope 1:.:storageview.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS storageview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/layouts/basiclayouts/CMakeLists.txt b/examples/widgets/layouts/basiclayouts/CMakeLists.txt index 28ac6a48b2..83c4833b9d 100644 --- a/examples/widgets/layouts/basiclayouts/CMakeLists.txt +++ b/examples/widgets/layouts/basiclayouts/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from basiclayouts.pro. -##################################################################### -## basiclayouts Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(basiclayouts LANGUAGES CXX) -add_qt_executable(basiclayouts - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/basiclayouts" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/basiclayouts" - SOURCES - dialog.cpp dialog.h - main.cpp - 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(basiclayouts WIN32 MACOSX_BUNDLE + dialog.cpp dialog.h + main.cpp +) +target_link_libraries(basiclayouts PUBLIC + Qt::Widgets +) + +install(TARGETS basiclayouts + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/layouts/borderlayout/CMakeLists.txt b/examples/widgets/layouts/borderlayout/CMakeLists.txt index 72cf6002a2..cfe34ad68f 100644 --- a/examples/widgets/layouts/borderlayout/CMakeLists.txt +++ b/examples/widgets/layouts/borderlayout/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from borderlayout.pro. -##################################################################### -## borderlayout Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(borderlayout LANGUAGES CXX) -add_qt_executable(borderlayout - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/borderlayout" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/borderlayout" - SOURCES - borderlayout.cpp borderlayout.h - main.cpp - window.cpp window.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(borderlayout WIN32 MACOSX_BUNDLE + borderlayout.cpp borderlayout.h + main.cpp + window.cpp window.h +) +target_link_libraries(borderlayout PUBLIC + Qt::Widgets +) + +install(TARGETS borderlayout + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt index 47f935bf68..1989672b9c 100644 --- a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt +++ b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from dynamiclayouts.pro. -##################################################################### -## dynamiclayouts Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(dynamiclayouts LANGUAGES CXX) -add_qt_executable(dynamiclayouts - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/dynamiclayouts" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/dynamiclayouts" - SOURCES - dialog.cpp dialog.h - main.cpp - 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(dynamiclayouts WIN32 MACOSX_BUNDLE + dialog.cpp dialog.h + main.cpp +) +target_link_libraries(dynamiclayouts PUBLIC + Qt::Widgets +) + +install(TARGETS dynamiclayouts + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/layouts/flowlayout/CMakeLists.txt b/examples/widgets/layouts/flowlayout/CMakeLists.txt index a887abb93e..6a7ad689ca 100644 --- a/examples/widgets/layouts/flowlayout/CMakeLists.txt +++ b/examples/widgets/layouts/flowlayout/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from flowlayout.pro. -##################################################################### -## flowlayout Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(flowlayout LANGUAGES CXX) -add_qt_executable(flowlayout_layout # special case - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/flowlayout" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/flowlayout" - SOURCES - flowlayout.cpp flowlayout.h - main.cpp - window.cpp window.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(flowlayout WIN32 MACOSX_BUNDLE + flowlayout.cpp flowlayout.h + main.cpp + window.cpp window.h +) +target_link_libraries(flowlayout PUBLIC + Qt::Widgets +) + +install(TARGETS flowlayout + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt b/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt index 52d1db1d9e..d442ccacd0 100644 --- a/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt +++ b/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from qmaccocoaviewcontainer.pro. -##################################################################### -## qmaccocoaviewcontainer Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(qmaccocoaviewcontainer LANGUAGES CXX) -add_qt_executable(qmaccocoaviewcontainer - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mac/qmaccocoaviewcontainer" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mac/qmaccocoaviewcontainer" - SOURCES - main.mm - LIBRARIES - Qt::Widgets - ${FWAppKit} +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(qmaccocoaviewcontainer WIN32 MACOSX_BUNDLE + main.mm +) +target_link_libraries(qmaccocoaviewcontainer PUBLIC + ${FWAppKit} + Qt::Widgets ) -#### Keys ignored in scope 1:.:qmaccocoaviewcontainer.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS qmaccocoaviewcontainer + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/mac/qmacnativewidget/CMakeLists.txt b/examples/widgets/mac/qmacnativewidget/CMakeLists.txt index 9708fae762..267b49361f 100644 --- a/examples/widgets/mac/qmacnativewidget/CMakeLists.txt +++ b/examples/widgets/mac/qmacnativewidget/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from qmacnativewidget.pro. -##################################################################### -## qmacnativewidget Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(qmacnativewidget LANGUAGES CXX) -add_qt_executable(qmacnativewidget - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mac/qmacnativewidget" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mac/qmacnativewidget" - SOURCES - main.mm - LIBRARIES - Qt::Widgets - ${FWAppKit} +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(qmacnativewidget WIN32 MACOSX_BUNDLE + main.mm +) +target_link_libraries(qmacnativewidget PUBLIC + ${FWAppKit} + Qt::Widgets ) -#### Keys ignored in scope 1:.:qmacnativewidget.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS qmacnativewidget + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) 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}" +) diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt index cda43296dd..a3dc7861fa 100644 --- a/examples/widgets/painting/affine/CMakeLists.txt +++ b/examples/widgets/painting/affine/CMakeLists.txt @@ -1,23 +1,33 @@ # Generated from affine.pro. -##################################################################### -## affine Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(affine LANGUAGES CXX) -add_qt_executable(affine - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/affine" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/affine" - SOURCES - main.cpp - xform.cpp xform.h - # INCLUDE_DIRECTORIES ../shared # special case - LIBRARIES # special case - painting_shared +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(affine WIN32 MACOSX_BUNDLE + # special case: remove files from ../shared + affine.qrc + main.cpp + xform.cpp xform.h +) +target_include_directories(affine PUBLIC + ../shared +) +target_link_libraries(affine PUBLIC + Qt::Widgets + painting_shared # special case ) -# Resources: -add_qt_resource(affine "affine" PREFIX "/res/affine" FILES - bg1.jpg - xform.cpp - xform.html) +install(TARGETS affine + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/painting/basicdrawing/CMakeLists.txt b/examples/widgets/painting/basicdrawing/CMakeLists.txt index 176149dad5..d0a0ac749d 100644 --- a/examples/widgets/painting/basicdrawing/CMakeLists.txt +++ b/examples/widgets/painting/basicdrawing/CMakeLists.txt @@ -1,23 +1,29 @@ # Generated from basicdrawing.pro. -##################################################################### -## basicdrawing Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(basicdrawing LANGUAGES CXX) -add_qt_executable(basicdrawing - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/basicdrawing" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/basicdrawing" - SOURCES - main.cpp - renderarea.cpp renderarea.h - window.cpp window.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(basicdrawing "basicdrawing" FILES - images/brick.png - images/qt-logo.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(basicdrawing WIN32 MACOSX_BUNDLE + basicdrawing.qrc + main.cpp + renderarea.cpp renderarea.h + window.cpp window.h +) +target_link_libraries(basicdrawing PUBLIC + Qt::Widgets +) + +install(TARGETS basicdrawing + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt index 1e83bc4814..d083cf00dd 100644 --- a/examples/widgets/painting/composition/CMakeLists.txt +++ b/examples/widgets/painting/composition/CMakeLists.txt @@ -1,23 +1,32 @@ # Generated from composition.pro. -##################################################################### -## composition Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(composition LANGUAGES CXX) -add_qt_executable(composition - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/composition" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/composition" - SOURCES - composition.cpp composition.h - main.cpp - LIBRARIES # special case - painting_shared +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(composition WIN32 MACOSX_BUNDLE + # special case: remove files from ../shared + composition.cpp composition.h composition.qrc + main.cpp +) +target_include_directories(composition PUBLIC + ../shared +) +target_link_libraries(composition PUBLIC + Qt::Widgets + painting_shared # special case ) -# Resources: -add_qt_resource(composition "composition" PREFIX "/res/composition" FILES - composition.cpp - composition.html - flower.jpg - flower_alpha.jpg) +install(TARGETS composition + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/painting/concentriccircles/CMakeLists.txt b/examples/widgets/painting/concentriccircles/CMakeLists.txt index a2305782a5..edbfea218d 100644 --- a/examples/widgets/painting/concentriccircles/CMakeLists.txt +++ b/examples/widgets/painting/concentriccircles/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from concentriccircles.pro. -##################################################################### -## concentriccircles Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(concentriccircles LANGUAGES CXX) -add_qt_executable(concentriccircles - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/concentriccircles" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/concentriccircles" - SOURCES - circlewidget.cpp circlewidget.h - main.cpp - window.cpp window.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(concentriccircles WIN32 MACOSX_BUNDLE + circlewidget.cpp circlewidget.h + main.cpp + window.cpp window.h +) +target_link_libraries(concentriccircles PUBLIC + Qt::Widgets +) + +install(TARGETS concentriccircles + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt index 67622da25d..591bc552ea 100644 --- a/examples/widgets/painting/deform/CMakeLists.txt +++ b/examples/widgets/painting/deform/CMakeLists.txt @@ -1,21 +1,33 @@ # Generated from deform.pro. -##################################################################### -## deform Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(deform LANGUAGES CXX) -add_qt_executable(deform - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/deform" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/deform" - SOURCES - main.cpp - pathdeform.cpp pathdeform.h - LIBRARIES # special case - painting_shared +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(deform WIN32 MACOSX_BUNDLE + # special case: remove files from ../shared + deform.qrc + main.cpp + pathdeform.cpp pathdeform.h +) +target_include_directories(deform PUBLIC + ../shared +) +target_link_libraries(deform PUBLIC + Qt::Widgets + painting_shared # special case ) -# Resources: -add_qt_resource(deform "deform" PREFIX "/res/deform" FILES - pathdeform.cpp - pathdeform.html) +install(TARGETS deform + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt index 38bb59eb6c..e533cdb63a 100644 --- a/examples/widgets/painting/fontsampler/CMakeLists.txt +++ b/examples/widgets/painting/fontsampler/CMakeLists.txt @@ -1,27 +1,28 @@ # Generated from fontsampler.pro. -##################################################################### -## fontsampler Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(fontsampler LANGUAGES CXX) -add_qt_executable(fontsampler - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/fontsampler" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/fontsampler" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - mainwindowbase.ui - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) + +add_executable(fontsampler WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h + mainwindowbase.ui +) +target_link_libraries(fontsampler PUBLIC + Qt::Widgets +) -extend_target(fontsampler CONDITION TARGET Qt::PrintSupport - PUBLIC_LIBRARIES - Qt::PrintSupport +install(TARGETS fontsampler + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt index 0d5553b986..b25739e919 100644 --- a/examples/widgets/painting/gradients/CMakeLists.txt +++ b/examples/widgets/painting/gradients/CMakeLists.txt @@ -1,21 +1,32 @@ # Generated from gradients.pro. -##################################################################### -## gradients Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(gradients LANGUAGES CXX) -add_qt_executable(gradients - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/gradients" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/gradients" - SOURCES - gradients.cpp gradients.h - main.cpp - LIBRARIES # special case - painting_shared +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(gradients WIN32 MACOSX_BUNDLE + # special case: remove files from ../shared + gradients.cpp gradients.h gradients.qrc + main.cpp +) +target_include_directories(gradients PUBLIC + ../shared +) +target_link_libraries(gradients PUBLIC + Qt::Widgets + painting_shared # special case ) -# Resources: -add_qt_resource(gradients "gradients" PREFIX "/res/gradients" FILES - gradients.cpp - gradients.html) +install(TARGETS gradients + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/painting/imagecomposition/CMakeLists.txt b/examples/widgets/painting/imagecomposition/CMakeLists.txt index eed2bede43..506a3d8510 100644 --- a/examples/widgets/painting/imagecomposition/CMakeLists.txt +++ b/examples/widgets/painting/imagecomposition/CMakeLists.txt @@ -1,22 +1,28 @@ # Generated from imagecomposition.pro. -##################################################################### -## imagecomposition Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(imagecomposition LANGUAGES CXX) -add_qt_executable(imagecomposition - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/imagecomposition" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/imagecomposition" - SOURCES - imagecomposer.cpp imagecomposer.h - main.cpp - 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(imagecomposition "imagecomposition" FILES - images/butterfly.png - images/checker.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(imagecomposition WIN32 MACOSX_BUNDLE + imagecomposer.cpp imagecomposer.h + imagecomposition.qrc + main.cpp +) +target_link_libraries(imagecomposition PUBLIC + Qt::Widgets +) + +install(TARGETS imagecomposition + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt index 13dd321a52..423d7d98ed 100644 --- a/examples/widgets/painting/painterpaths/CMakeLists.txt +++ b/examples/widgets/painting/painterpaths/CMakeLists.txt @@ -1,26 +1,28 @@ # Generated from painterpaths.pro. -##################################################################### -## painterpaths Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(painterpaths LANGUAGES CXX) -add_qt_executable(painterpaths - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/painterpaths" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/painterpaths" - SOURCES - main.cpp - renderarea.cpp renderarea.h - window.cpp window.h - LIBRARIES - Qt::Widgets - painting_shared # special case -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) + +add_executable(painterpaths WIN32 MACOSX_BUNDLE + main.cpp + renderarea.cpp renderarea.h + window.cpp window.h +) +target_link_libraries(painterpaths PUBLIC + Qt::Widgets +) -extend_target(painterpaths CONDITION UNIX AND NOT APPLE_OSX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS - LIBRARIES - m +install(TARGETS painterpaths + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/painting/pathstroke/CMakeLists.txt b/examples/widgets/painting/pathstroke/CMakeLists.txt index 150a1baa83..ce32f38549 100644 --- a/examples/widgets/painting/pathstroke/CMakeLists.txt +++ b/examples/widgets/painting/pathstroke/CMakeLists.txt @@ -1,21 +1,34 @@ # Generated from pathstroke.pro. -##################################################################### -## pathstroke Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(pathstroke LANGUAGES CXX) -add_qt_executable(pathstroke - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/pathstroke" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/pathstroke" - SOURCES - main.cpp - pathstroke.cpp pathstroke.h - LIBRARIES # special case - painting_shared +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(pathstroke WIN32 MACOSX_BUNDLE + ../shared/arthurstyle.cpp ../shared/arthurstyle.h + ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h + ../shared/hoverpoints.cpp ../shared/hoverpoints.h + ../shared/shared.qrc + main.cpp + pathstroke.cpp pathstroke.h pathstroke.qrc +) +target_include_directories(pathstroke PUBLIC + ../shared +) +target_link_libraries(pathstroke PUBLIC + Qt::Widgets ) -# Resources: -add_qt_resource(pathstroke "pathstroke" PREFIX "/res/pathstroke" FILES - pathstroke.cpp - pathstroke.html) +install(TARGETS pathstroke + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/painting/shared/CMakeLists.txt b/examples/widgets/painting/shared/CMakeLists.txt index a7bec2789b..c94a586425 100644 --- a/examples/widgets/painting/shared/CMakeLists.txt +++ b/examples/widgets/painting/shared/CMakeLists.txt @@ -2,7 +2,7 @@ # special case: add_library(painting_shared OBJECT) -qt_manual_moc(moc_files arthurwidgets.h hoverpoints.h) # no automoc for OBJECT libs:-/ +qt5_wrap_cpp(moc_files arthurwidgets.h hoverpoints.h) # no automoc for OBJECT libs:-/ target_sources(painting_shared PRIVATE arthurstyle.cpp arthurstyle.h arthurwidgets.cpp arthurwidgets.h @@ -12,53 +12,16 @@ target_sources(painting_shared PRIVATE target_link_libraries(painting_shared PUBLIC Qt::Widgets) target_include_directories(painting_shared PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") - -# Resources: -add_qt_resource(painting_shared "shared" PREFIX "/res" FILES - images/button_normal_cap_left.png - images/button_normal_cap_right.png - images/button_normal_stretch.png - images/button_pressed_cap_left.png - images/button_pressed_cap_right.png - images/button_pressed_stretch.png - images/frame_bottom.png - images/frame_bottomleft.png - images/frame_bottomright.png - images/frame_left.png - images/frame_right.png - images/frame_top.png - images/frame_topleft.png - images/frame_topright.png - images/groupframe_bottom_left.png - images/groupframe_bottom_right.png - images/groupframe_bottom_stretch.png - images/groupframe_left_stretch.png - images/groupframe_right_stretch.png - images/groupframe_top_stretch.png - images/groupframe_topleft.png - images/groupframe_topright.png - images/line_dash_dot.png - images/line_dash_dot_dot.png - images/line_dashed.png - images/line_dotted.png - images/line_solid.png - images/radiobutton-on.png - images/radiobutton_off.png - images/radiobutton_on.png - images/slider_bar.png - images/slider_thumb_on.png - images/title_cap_left.png - images/title_cap_right.png - images/title_stretch.png) - +qt5_add_resources(res_files shared.qrc) +target_sources(painting_shared PRIVATE ${res_files}) ## Scopes: ##################################################################### -extend_target(painting_shared CONDITION TARGET Qt::OpenGL OR QT_FEATURE_opengles2 - DEFINES - QT_OPENGL_SUPPORT - LIBRARIES +if (TARGET Qt::OpenGL OR QT_FEATURE_opengles2) + target_compile_definitions(painting_shared PRIVATE QT_OPENGL_SUPPORT) + target_link_libraries(painting_shared PRIVATE Qt::OpenGL Qt::Widgets -) + ) +endif() diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt index a3c3130c32..5837f90f9d 100644 --- a/examples/widgets/painting/transformations/CMakeLists.txt +++ b/examples/widgets/painting/transformations/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from transformations.pro. -##################################################################### -## transformations Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(transformations LANGUAGES CXX) -add_qt_executable(transformations - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/transformations" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/transformations" - SOURCES - main.cpp - renderarea.cpp renderarea.h - window.cpp window.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(transformations WIN32 MACOSX_BUNDLE + main.cpp + renderarea.cpp renderarea.h + window.cpp window.h +) +target_link_libraries(transformations PUBLIC + Qt::Widgets +) + +install(TARGETS transformations + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/richtext/calendar/CMakeLists.txt b/examples/widgets/richtext/calendar/CMakeLists.txt index 8d26479929..099991172d 100644 --- a/examples/widgets/richtext/calendar/CMakeLists.txt +++ b/examples/widgets/richtext/calendar/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from calendar.pro. -##################################################################### -## calendar Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(calendar LANGUAGES CXX) -add_qt_executable(calendar - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/calendar" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/calendar" - 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(calendar WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(calendar PUBLIC + Qt::Widgets +) + +install(TARGETS calendar + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/richtext/orderform/CMakeLists.txt b/examples/widgets/richtext/orderform/CMakeLists.txt index 5f12e98cdf..9dd715c752 100644 --- a/examples/widgets/richtext/orderform/CMakeLists.txt +++ b/examples/widgets/richtext/orderform/CMakeLists.txt @@ -1,25 +1,32 @@ # Generated from orderform.pro. -##################################################################### -## orderform Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(orderform LANGUAGES CXX) -add_qt_executable(orderform - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/orderform" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/orderform" - SOURCES - detailsdialog.cpp detailsdialog.h - 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") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS PrintSupport) + +add_executable(orderform WIN32 MACOSX_BUNDLE + detailsdialog.cpp detailsdialog.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(orderform PUBLIC + Qt::Widgets +) +if (TARGET Qt::PrintSupport) + target_link_libraries(orderform PUBLIC Qt::PrintSupport) +endif() -extend_target(orderform CONDITION TARGET Qt::PrintSupport - LIBRARIES - Qt::PrintSupport +install(TARGETS orderform + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt index afffcc639b..918843e1bd 100644 --- a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt +++ b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from syntaxhighlighter.pro. -##################################################################### -## syntaxhighlighter Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(syntaxhighlighter LANGUAGES CXX) -add_qt_executable(syntaxhighlighter - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/syntaxhighlighter" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/syntaxhighlighter" - SOURCES - highlighter.cpp highlighter.h - 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(syntaxhighlighter WIN32 MACOSX_BUNDLE + highlighter.cpp highlighter.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(syntaxhighlighter PUBLIC + Qt::Widgets +) + +install(TARGETS syntaxhighlighter + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/richtext/textedit/CMakeLists.txt b/examples/widgets/richtext/textedit/CMakeLists.txt index 487f708b34..54689bae5b 100644 --- a/examples/widgets/richtext/textedit/CMakeLists.txt +++ b/examples/widgets/richtext/textedit/CMakeLists.txt @@ -1,83 +1,33 @@ # Generated from textedit.pro. -##################################################################### -## textedit Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(textedit LANGUAGES CXX) -add_qt_executable(textedit - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/textedit" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/textedit" - SOURCES - main.cpp - textedit.cpp textedit.h - PUBLIC_LIBRARIES - Qt::Widgets -) - -# Resources: -add_qt_resource(textedit "textedit" PREFIX "/" FILES - example.html - images/logo32.png - images/mac/checkbox-checked.png - images/mac/checkbox.png - images/mac/editcopy.png - images/mac/editcut.png - images/mac/editpaste.png - images/mac/editredo.png - images/mac/editundo.png - images/mac/exportpdf.png - images/mac/filenew.png - images/mac/fileopen.png - images/mac/fileprint.png - images/mac/filesave.png - images/mac/format-indent-less.png - images/mac/format-indent-more.png - images/mac/textbold.png - images/mac/textcenter.png - images/mac/textitalic.png - images/mac/textjustify.png - images/mac/textleft.png - images/mac/textright.png - images/mac/textunder.png - images/mac/zoomin.png - images/mac/zoomout.png - images/win/checkbox-checked.png - images/win/checkbox.png - images/win/editcopy.png - images/win/editcut.png - images/win/editpaste.png - images/win/editredo.png - images/win/editundo.png - images/win/exportpdf.png - images/win/filenew.png - images/win/fileopen.png - images/win/fileprint.png - images/win/filesave.png - images/win/format-indent-less.png - images/win/format-indent-more.png - images/win/textbold.png - images/win/textcenter.png - images/win/textitalic.png - images/win/textjustify.png - images/win/textleft.png - images/win/textright.png - images/win/textunder.png - images/win/zoomin.png - images/win/zoomout.png) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -#### Keys ignored in scope 1:.:.:textedit.pro:<TRUE>: -# EXAMPLE_FILES = "textedit.qdoc" -# TEMPLATE = "app" +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS PrintSupport) # special case -extend_target(textedit CONDITION TARGET Qt::PrintSupport - PUBLIC_LIBRARIES - Qt::PrintSupport +add_executable(textedit WIN32 MACOSX_BUNDLE + main.cpp + textedit.cpp textedit.h textedit.qrc +) +target_link_libraries(textedit PUBLIC + Qt::Widgets +) +# special case begin +if (TARGET Qt::PrintSupport) + target_link_libraries(textedit PUBLIC Qt::PrintSupport) +endif() +# special case end + +install(TARGETS textedit + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) - -#### Keys ignored in scope 3:.:.:textedit.pro:build_all AND NOT build_pass: -# CONFIG = "-build_all" "release" diff --git a/examples/widgets/scroller/graphicsview/CMakeLists.txt b/examples/widgets/scroller/graphicsview/CMakeLists.txt index 0f25d6b71c..5b36cfc9ae 100644 --- a/examples/widgets/scroller/graphicsview/CMakeLists.txt +++ b/examples/widgets/scroller/graphicsview/CMakeLists.txt @@ -1,18 +1,26 @@ # Generated from graphicsview.pro. -##################################################################### -## graphicsview Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(graphicsview LANGUAGES CXX) -add_qt_executable(graphicsview - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/scroller/graphicsview" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/scroller/graphicsview" - SOURCES - main.cpp - 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(graphicsview WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(graphicsview PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:graphicsview.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS graphicsview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/statemachine/eventtransitions/CMakeLists.txt b/examples/widgets/statemachine/eventtransitions/CMakeLists.txt index 0fc20f59ae..758265686b 100644 --- a/examples/widgets/statemachine/eventtransitions/CMakeLists.txt +++ b/examples/widgets/statemachine/eventtransitions/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from eventtransitions.pro. -##################################################################### -## eventtransitions Binary: -##################################################################### - -add_qt_executable(eventtransitions - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/eventtransitions" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/eventtransitions" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(eventtransitions LANGUAGES CXX) + +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(eventtransitions WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(eventtransitions PUBLIC + Qt::Widgets +) + +install(TARGETS eventtransitions + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/statemachine/factorial/CMakeLists.txt b/examples/widgets/statemachine/factorial/CMakeLists.txt index e38995220e..e383225705 100644 --- a/examples/widgets/statemachine/factorial/CMakeLists.txt +++ b/examples/widgets/statemachine/factorial/CMakeLists.txt @@ -1,22 +1,26 @@ # Generated from factorial.pro. -##################################################################### -## factorial Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(factorial LANGUAGES CXX) -add_qt_executable(factorial - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/factorial" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/factorial" - SOURCES - main.cpp -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Core) -#### Keys ignored in scope 2:.:factorial.pro:WIN32: -# CONFIG = "console" +add_executable(factorial + main.cpp +) +target_link_libraries(factorial PUBLIC + Qt::Core +) -#### Keys ignored in scope 3:.:factorial.pro:APPLE_OSX: -# CONFIG = "-app_bundle" +install(TARGETS factorial + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/statemachine/pingpong/CMakeLists.txt b/examples/widgets/statemachine/pingpong/CMakeLists.txt index b911bd727f..e3745a280d 100644 --- a/examples/widgets/statemachine/pingpong/CMakeLists.txt +++ b/examples/widgets/statemachine/pingpong/CMakeLists.txt @@ -1,22 +1,26 @@ # Generated from pingpong.pro. -##################################################################### -## pingpong Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(pingpong LANGUAGES CXX) -add_qt_executable(pingpong - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/pingpong" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/pingpong" - SOURCES - main.cpp -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Core) -#### Keys ignored in scope 2:.:pingpong.pro:WIN32: -# CONFIG = "console" +add_executable(pingpong + main.cpp +) +target_link_libraries(pingpong PUBLIC + Qt::Core +) -#### Keys ignored in scope 3:.:pingpong.pro:APPLE_OSX: -# CONFIG = "-app_bundle" +install(TARGETS pingpong + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/statemachine/rogue/CMakeLists.txt b/examples/widgets/statemachine/rogue/CMakeLists.txt index a6a1a473e1..7ce3c5c966 100644 --- a/examples/widgets/statemachine/rogue/CMakeLists.txt +++ b/examples/widgets/statemachine/rogue/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from rogue.pro. -##################################################################### -## rogue Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(rogue LANGUAGES CXX) -add_qt_executable(rogue - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/rogue" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/rogue" - SOURCES - main.cpp - movementtransition.h - window.cpp window.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(rogue WIN32 MACOSX_BUNDLE + main.cpp + movementtransition.h + window.cpp window.h +) +target_link_libraries(rogue PUBLIC + Qt::Widgets +) + +install(TARGETS rogue + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/statemachine/trafficlight/CMakeLists.txt b/examples/widgets/statemachine/trafficlight/CMakeLists.txt index 52f9fb3c6c..3325c5fe46 100644 --- a/examples/widgets/statemachine/trafficlight/CMakeLists.txt +++ b/examples/widgets/statemachine/trafficlight/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from trafficlight.pro. -##################################################################### -## trafficlight Binary: -##################################################################### - -add_qt_executable(trafficlight - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/trafficlight" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/trafficlight" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(trafficlight LANGUAGES CXX) + +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(trafficlight WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(trafficlight PUBLIC + Qt::Widgets +) + +install(TARGETS trafficlight + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/statemachine/twowaybutton/CMakeLists.txt b/examples/widgets/statemachine/twowaybutton/CMakeLists.txt index c5f14b7514..3ea05f9595 100644 --- a/examples/widgets/statemachine/twowaybutton/CMakeLists.txt +++ b/examples/widgets/statemachine/twowaybutton/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from twowaybutton.pro. -##################################################################### -## twowaybutton Binary: -##################################################################### - -add_qt_executable(twowaybutton - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/twowaybutton" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/twowaybutton" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(twowaybutton LANGUAGES CXX) + +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(twowaybutton WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(twowaybutton PUBLIC + Qt::Widgets +) + +install(TARGETS twowaybutton + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tools/CMakeLists.txt b/examples/widgets/tools/CMakeLists.txt index 90ac6fe86f..042f751b0f 100644 --- a/examples/widgets/tools/CMakeLists.txt +++ b/examples/widgets/tools/CMakeLists.txt @@ -16,5 +16,7 @@ add_subdirectory(undoframework) if(QT_FEATURE_library) # special case add_subdirectory(echoplugin) - add_subdirectory(plugandpaint) + # FIXME: Currently broken # special case + # Fails to link (ld: error: undefined symbol: qt_static_plugin_BasicToolsPlugin()) # special case + #add_subdirectory(plugandpaint) # special case endif() diff --git a/examples/widgets/tools/codecs/CMakeLists.txt b/examples/widgets/tools/codecs/CMakeLists.txt index 703aa3fb47..99040e807e 100644 --- a/examples/widgets/tools/codecs/CMakeLists.txt +++ b/examples/widgets/tools/codecs/CMakeLists.txt @@ -1,26 +1,30 @@ # Generated from codecs.pro. -##################################################################### -## codecs Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(codecs LANGUAGES CXX) -add_qt_executable(codecs - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/codecs" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/codecs" - SOURCES - encodingdialog.cpp encodingdialog.h - main.cpp - mainwindow.cpp mainwindow.h - previewform.cpp previewform.h - PUBLIC_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") -# Resources: -add_qt_resource(codecs "codecs" PREFIX "/" FILES - images/editcopy.png) +find_package(Qt5 COMPONENTS Widgets) +add_executable(codecs WIN32 MACOSX_BUNDLE + codecs.qrc + encodingdialog.cpp encodingdialog.h + main.cpp + mainwindow.cpp mainwindow.h + previewform.cpp previewform.h +) +target_link_libraries(codecs PUBLIC + Qt::Widgets +) -#### Keys ignored in scope 1:.:.:codecs.pro:<TRUE>: -# EXAMPLE_FILES = "encodedfiles" +install(TARGETS codecs + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt index b39b4f262d..9db2d089d9 100644 --- a/examples/widgets/tools/completer/CMakeLists.txt +++ b/examples/widgets/tools/completer/CMakeLists.txt @@ -1,23 +1,29 @@ # Generated from completer.pro. -##################################################################### -## completer Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(completer LANGUAGES CXX) -add_qt_executable(completer - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/completer" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/completer" - SOURCES - fsmodel.cpp fsmodel.h - 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(completer "completer" PREFIX "/" FILES - resources/countries.txt - resources/wordlist.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(completer WIN32 MACOSX_BUNDLE + completer.qrc + fsmodel.cpp fsmodel.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(completer PUBLIC + Qt::Widgets +) + +install(TARGETS completer + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt index 04f8035ff3..7c1db10bef 100644 --- a/examples/widgets/tools/customcompleter/CMakeLists.txt +++ b/examples/widgets/tools/customcompleter/CMakeLists.txt @@ -1,22 +1,29 @@ # Generated from customcompleter.pro. -##################################################################### -## customcompleter Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(customcompleter LANGUAGES CXX) -add_qt_executable(customcompleter - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - textedit.cpp textedit.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(customcompleter "customcompleter" PREFIX "/" FILES - resources/wordlist.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(customcompleter WIN32 MACOSX_BUNDLE + customcompleter.qrc + main.cpp + mainwindow.cpp mainwindow.h + textedit.cpp textedit.h +) +target_link_libraries(customcompleter PUBLIC + Qt::Widgets +) + +install(TARGETS customcompleter + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt index 3c9082db07..941007505d 100644 --- a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt +++ b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt @@ -1,33 +1,28 @@ # Generated from echowindow.pro. -##################################################################### -## echoplugin Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(echoplugin LANGUAGES CXX) -add_qt_executable(echoplugin - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin" - SOURCES - echointerface.h - echowindow.cpp echowindow.h - main.cpp - LIBRARIES - Qt::Widgets -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -#### Keys ignored in scope 1:.:echowindow.pro:<NONE>: -# CONFIG = "install_ok" -# QMAKE_PROJECT_NAME = "echopluginwindow" +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -## Scopes: -##################################################################### +set(INSTALL_EXAMPLEDIR "examples") -#### Keys ignored in scope 3:.:echowindow.pro:CONFIG(debug,release OR debug): -# DESTDIR = "../debug/" +find_package(Qt5 COMPONENTS Widgets) -#### Keys ignored in scope 4:.:echowindow.pro:CONFIG(release,release OR debug): -# DESTDIR = "../release/" +add_executable(echopluginwindow WIN32 MACOSX_BUNDLE # special case: renamed target + echointerface.h + echowindow.cpp echowindow.h + main.cpp +) +target_link_libraries(echopluginwindow PUBLIC # special case: renamed target + Qt::Widgets +) -#### Keys ignored in scope 5:.:echowindow.pro:else: -# DESTDIR = "../" +install(TARGETS echopluginwindow # special case: renamed target + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt index 7250a7e0a6..78f5dcbe70 100644 --- a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt +++ b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt @@ -1,22 +1,10 @@ -# Generated from plugin.pro. +# special case begin -##################################################################### -## qtLibraryTargetechoplugin Module: -##################################################################### - -add_qt_plugin(echoplugin_plugin TYPE plugin # special case - SOURCES - echoplugin.cpp echoplugin.h - INCLUDE_DIRECTORIES - ../echowindow - LIBRARIES - Qt::Widgets +add_library(echoplugin MODULE + echoplugin.cpp echoplugin.h ) -#### Keys ignored in scope 1:.:plugin.pro:<NONE>: -# CONFIG = "plugin" "install_ok" -# DESTDIR = "../plugins" -# EXAMPLE_FILES = "echoplugin.json" -# INSTALLS = "target" -# TEMPLATE = "lib" -# target.path = "$$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin/plugins" +target_include_directories(echoplugin PUBLIC ../echowindow) +target_link_libraries(echoplugin PUBLIC Qt::Widgets) + +# special case end diff --git a/examples/widgets/tools/i18n/CMakeLists.txt b/examples/widgets/tools/i18n/CMakeLists.txt index 033362bb4c..3835cc27ea 100644 --- a/examples/widgets/tools/i18n/CMakeLists.txt +++ b/examples/widgets/tools/i18n/CMakeLists.txt @@ -1,38 +1,29 @@ # Generated from i18n.pro. -##################################################################### -## i18n Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(i18n LANGUAGES CXX) -add_qt_executable(i18n - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/i18n" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/i18n" - SOURCES - languagechooser.cpp languagechooser.h - 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") -# Resources: -add_qt_resource(i18n "i18n" FILES - translations/i18n_ar.qm - translations/i18n_cs.qm - translations/i18n_de.qm - translations/i18n_el.qm - translations/i18n_en.qm - translations/i18n_eo.qm - translations/i18n_fr.qm - translations/i18n_it.qm - translations/i18n_jp.qm - translations/i18n_ko.qm - translations/i18n_no.qm - translations/i18n_ru.qm - translations/i18n_sv.qm - translations/i18n_zh.qm) +find_package(Qt5 COMPONENTS Widgets) +add_executable(i18n WIN32 MACOSX_BUNDLE + i18n.qrc + languagechooser.cpp languagechooser.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(i18n PUBLIC + Qt::Widgets +) -#### Keys ignored in scope 1:.:i18n.pro:<NONE>: -# TRANSLATIONS = "translations/i18n_ar.ts" "translations/i18n_cs.ts" "translations/i18n_de.ts" "translations/i18n_el.ts" "translations/i18n_en.ts" "translations/i18n_eo.ts" "translations/i18n_fr.ts" "translations/i18n_it.ts" "translations/i18n_jp.ts" "translations/i18n_ko.ts" "translations/i18n_no.ts" "translations/i18n_ru.ts" "translations/i18n_sv.ts" "translations/i18n_zh.ts" +install(TARGETS i18n + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt index e5bbbacec2..2e730791cc 100644 --- a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt +++ b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt @@ -1,29 +1,33 @@ # Generated from app.pro. -##################################################################### -## plugandpaint Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(plugandpaint LANGUAGES CXX) -add_qt_executable(plugandpaint - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint" - SOURCES - interfaces.h - main.cpp - mainwindow.cpp mainwindow.h - paintarea.cpp paintarea.h - plugindialog.cpp plugindialog.h - LIBRARIES - Qt::Widgets - pnp_basictools # special case -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") -#### Keys ignored in scope 1:.:app.pro:<NONE>: -# CONFIG = "install_ok" -# DESTDIR = ".." +find_package(Qt5 COMPONENTS Widgets) -## Scopes: -##################################################################### +add_executable(plugandpaint WIN32 MACOSX_BUNDLE + interfaces.h + main.cpp + mainwindow.cpp mainwindow.h + paintarea.cpp paintarea.h + plugindialog.cpp plugindialog.h +) +target_link_libraries(plugandpaint PUBLIC + # Remove: L../plugins + Qt::Widgets + pnp_basictools # special case +) +target_link_libraries(plugandpaint PUBLIC pnp_basictools) # special case -# special case: Remove the rest +install(TARGETS plugandpaint + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt index a059d0deab..64d239b054 100644 --- a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt +++ b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt @@ -1,30 +1,13 @@ -# Generated from basictools.pro. +# special case begin -##################################################################### -## qtLibraryTargetpnp_basictools Module: -##################################################################### - -add_qt_plugin(pnp_basictools # special case - STATIC # special case - OUTPUT_DIRECTORY ../../plugins # special case - INSTALL_DIRECTORY ../../plugins # special case - ARCHIVE_INSTALL_DIRECTORY ../../plugins # special case - SOURCES - basictoolsplugin.cpp basictoolsplugin.h - INCLUDE_DIRECTORIES - ../../app - LIBRARIES - Qt::Widgets +add_library(pnp_basictools MODULE STATIC + basictoolsplugin.cpp basictoolsplugin.h ) +set_target_properties(pnp_basictools PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "../../plugins" + RUNTIME_OUTPUT_DIRECTORY "../../plugins" +) +target_include_directories(pnp_basictools PUBLIC ../../app) +target_link_libraries(pnp_basictools PUBLIC Qt::Widgets) -# CONFIG = "plugin" "static" "install_ok" -# DESTDIR = "../../plugins" -# INSTALLS = "target" -# TEMPLATE = "lib" -# target.path = "$$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins" - -## Scopes: -##################################################################### - -#### Keys ignored in scope 2:.:basictools.pro:APPLE_UIKIT: -# CONFIG = "debug_and_release" +# special case end diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt index a0447c833e..31d6f5ef65 100644 --- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt +++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt @@ -1,27 +1,9 @@ -# Generated from extrafilters.pro. +# special case begin -##################################################################### -## qtLibraryTargetpnp_extrafilters Module: -##################################################################### - -add_qt_plugin(pnp_extrafilters_plugin TYPE plugin # special case - SOURCES - extrafiltersplugin.cpp extrafiltersplugin.h - INCLUDE_DIRECTORIES - ../../app - LIBRARIES - Qt::Widgets +add_library(pnp_extrafilters_plugin MODULE + extrafiltersplugin.cpp extrafiltersplugin.h ) +target_include_directories(pnp_extrafilters_plugin PRIVATE ../../app) +target_link_libraries(pnp_extrafilters_plugin PRIVATE Qt::Widgets) -#### Keys ignored in scope 1:.:extrafilters.pro:<NONE>: -# CONFIG = "plugin" "install_ok" -# DESTDIR = "../../plugins" -# INSTALLS = "target" -# TEMPLATE = "lib" -# target.path = "$$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins" - -## Scopes: -##################################################################### - -#### Keys ignored in scope 2:.:extrafilters.pro:APPLE_UIKIT: -# CONFIG = "debug_and_release" +# special case end diff --git a/examples/widgets/tools/regexp/CMakeLists.txt b/examples/widgets/tools/regexp/CMakeLists.txt index da729f5f5b..026e72673a 100644 --- a/examples/widgets/tools/regexp/CMakeLists.txt +++ b/examples/widgets/tools/regexp/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from regexp.pro. -##################################################################### -## regexp Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(regexp LANGUAGES CXX) -add_qt_executable(regexp - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/regexp" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/regexp" - SOURCES - main.cpp - regexpdialog.cpp regexpdialog.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(regexp WIN32 MACOSX_BUNDLE + main.cpp + regexpdialog.cpp regexpdialog.h +) +target_link_libraries(regexp PUBLIC + Qt::Widgets +) + +install(TARGETS regexp + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt index e9dcb977a2..ba7274b007 100644 --- a/examples/widgets/tools/regularexpression/CMakeLists.txt +++ b/examples/widgets/tools/regularexpression/CMakeLists.txt @@ -1,21 +1,28 @@ # Generated from regularexpression.pro. -##################################################################### -## regularexpression Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(regularexpression LANGUAGES CXX) -add_qt_executable(regularexpression - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression" - SOURCES - main.cpp - regularexpressiondialog.cpp regularexpressiondialog.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(regularexpression "regularexpression" FILES - images/copy.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(regularexpression WIN32 MACOSX_BUNDLE + main.cpp + regularexpression.qrc + regularexpressiondialog.cpp regularexpressiondialog.h +) +target_link_libraries(regularexpression PUBLIC + Qt::Widgets +) + +install(TARGETS regularexpression + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/settingseditor/CMakeLists.txt b/examples/widgets/tools/settingseditor/CMakeLists.txt index ce260da358..7bfa75cade 100644 --- a/examples/widgets/tools/settingseditor/CMakeLists.txt +++ b/examples/widgets/tools/settingseditor/CMakeLists.txt @@ -1,22 +1,30 @@ # Generated from settingseditor.pro. -##################################################################### -## settingseditor Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(settingseditor LANGUAGES CXX) -add_qt_executable(settingseditor - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor" - SOURCES - locationdialog.cpp locationdialog.h - main.cpp - mainwindow.cpp mainwindow.h - settingstree.cpp settingstree.h - variantdelegate.cpp variantdelegate.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(settingseditor WIN32 MACOSX_BUNDLE + locationdialog.cpp locationdialog.h + main.cpp + mainwindow.cpp mainwindow.h + settingstree.cpp settingstree.h + variantdelegate.cpp variantdelegate.h +) +target_link_libraries(settingseditor PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:settingseditor.pro:<NONE>: -# EXAMPLE_FILES = "inifiles" +install(TARGETS settingseditor + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/styleplugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/CMakeLists.txt index 630c3703f8..8ee575f8a6 100644 --- a/examples/widgets/tools/styleplugin/CMakeLists.txt +++ b/examples/widgets/tools/styleplugin/CMakeLists.txt @@ -1,4 +1,19 @@ # Generated from styleplugin.pro. +# special case begin +cmake_minimum_required(VERSION 3.14) +project(styleplugin LANGUAGES CXX) + +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) +# special case end + add_subdirectory(stylewindow) add_subdirectory(plugin) diff --git a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt index c311799d30..28c6ec07ab 100644 --- a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt +++ b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt @@ -1,32 +1,9 @@ -# Generated from plugin.pro. +# special case begin -##################################################################### -## mplestyleplugin Module: -##################################################################### - -add_qt_plugin(simplestyleplugin TYPE style # special case - SOURCES - simplestyle.cpp simplestyle.h - simplestyleplugin.cpp simplestyleplugin.h - LIBRARIES - Qt::Widgets +add_library(simplestyleplugin MODULE + simplestyle.cpp simplestyle.h + simplestyleplugin.cpp simplestyleplugin.h ) +target_link_libraries(simplestyleplugin PUBLIC Qt::Widgets) -#### Keys ignored in scope 1:.:plugin.pro:<NONE>: -# CONFIG = "plugin" "install_ok" -# EXAMPLE_FILES = "simplestyle.json" -# INSTALLS = "target" -# TEMPLATE = "lib" -# target.path = "$$[QT_INSTALL_EXAMPLES]/widgets/tools/styleplugin/styles" - -## Scopes: -##################################################################### - -#### Keys ignored in scope 3:.:plugin.pro:CONFIG(debug,release OR debug): -# DESTDIR = "../debug/styles/" - -#### Keys ignored in scope 4:.:plugin.pro:CONFIG(release,release OR debug): -# DESTDIR = "../release/styles/" - -#### Keys ignored in scope 5:.:plugin.pro:else: -# DESTDIR = "../styles/" +# special case end diff --git a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt index a6d6a56874..3e3893ad03 100644 --- a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt +++ b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt @@ -1,31 +1,27 @@ # Generated from stylewindow.pro. -##################################################################### -## styleplugin Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(styleplugin LANGUAGES CXX) -add_qt_executable(styleplugin - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin" - SOURCES - main.cpp - stylewindow.cpp stylewindow.h - LIBRARIES - Qt::Widgets -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -#### Keys ignored in scope 1:.:stylewindow.pro:<NONE>: -# CONFIG = "install_ok" +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -## Scopes: -##################################################################### +set(INSTALL_EXAMPLEDIR "examples") -#### Keys ignored in scope 3:.:stylewindow.pro:debug: -# DESTDIR = "../debug/" +find_package(Qt5 COMPONENTS Widgets) -#### Keys ignored in scope 4:.:stylewindow.pro:release: -# DESTDIR = "../release/" +add_executable(styleplugin WIN32 MACOSX_BUNDLE + main.cpp + stylewindow.cpp stylewindow.h +) +target_link_libraries(styleplugin PUBLIC + Qt::Widgets +) -#### Keys ignored in scope 5:.:stylewindow.pro:else: -# DESTDIR = "../" +install(TARGETS styleplugin + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt index ab4d60f290..a6bd7177f1 100644 --- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt +++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt @@ -1,22 +1,28 @@ # Generated from treemodelcompleter.pro. -##################################################################### -## treemodelcompleter Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(treemodelcompleter LANGUAGES CXX) -add_qt_executable(treemodelcompleter - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - treemodelcompleter.cpp treemodelcompleter.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(treemodelcompleter "treemodelcompleter" PREFIX "/" FILES - resources/treemodel.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(treemodelcompleter WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h + treemodelcompleter.cpp treemodelcompleter.h treemodelcompleter.qrc +) +target_link_libraries(treemodelcompleter PUBLIC + Qt::Widgets +) + +install(TARGETS treemodelcompleter + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/undo/CMakeLists.txt b/examples/widgets/tools/undo/CMakeLists.txt index f3f1a5a436..5cd91dda0a 100644 --- a/examples/widgets/tools/undo/CMakeLists.txt +++ b/examples/widgets/tools/undo/CMakeLists.txt @@ -1,46 +1,30 @@ # Generated from undo.pro. -##################################################################### -## undo Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(undo LANGUAGES CXX) -add_qt_executable(undo - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/undo" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/undo" - SOURCES - commands.cpp commands.h - document.cpp document.h - main.cpp - mainwindow.cpp mainwindow.h mainwindow.ui - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Resources: -add_qt_resource(undo "undo" PREFIX "/" FILES - icons/background.png - icons/blue.png - icons/circle.png - icons/exit.png - icons/fileclose.png - icons/filenew.png - icons/fileopen.png - icons/filesave.png - icons/green.png - icons/ok.png - icons/rectangle.png - icons/red.png - icons/redo.png - icons/remove.png - icons/triangle.png - icons/undo.png) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) -#### Keys ignored in scope 2:.:.:undo.pro:build_all AND NOT build_pass: -# CONFIG = "-build_all" "release" +add_executable(undo WIN32 MACOSX_BUNDLE + commands.cpp commands.h + document.cpp document.h + main.cpp + mainwindow.cpp mainwindow.h mainwindow.ui + undo.qrc +) +target_link_libraries(undo PUBLIC + Qt::Widgets +) + +install(TARGETS undo + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/undoframework/CMakeLists.txt b/examples/widgets/tools/undoframework/CMakeLists.txt index 0689d0df08..a1a6c2c624 100644 --- a/examples/widgets/tools/undoframework/CMakeLists.txt +++ b/examples/widgets/tools/undoframework/CMakeLists.txt @@ -1,24 +1,31 @@ # Generated from undoframework.pro. -##################################################################### -## undoframework Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(undoframework LANGUAGES CXX) -add_qt_executable(undoframework - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework" - SOURCES - commands.cpp commands.h - diagramitem.cpp diagramitem.h - diagramscene.cpp diagramscene.h - 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(undoframework "undoframework" FILES - images/cross.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(undoframework WIN32 MACOSX_BUNDLE + commands.cpp commands.h + diagramitem.cpp diagramitem.h + diagramscene.cpp diagramscene.h + main.cpp + mainwindow.cpp mainwindow.h + undoframework.qrc +) +target_link_libraries(undoframework PUBLIC + Qt::Widgets +) + +install(TARGETS undoframework + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/touch/dials/CMakeLists.txt b/examples/widgets/touch/dials/CMakeLists.txt index 76920b0f3c..0589e555f3 100644 --- a/examples/widgets/touch/dials/CMakeLists.txt +++ b/examples/widgets/touch/dials/CMakeLists.txt @@ -1,18 +1,27 @@ # Generated from dials.pro. -##################################################################### -## dials Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(dials LANGUAGES CXX) -add_qt_executable(dials - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/dials" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/dials" - SOURCES - dials.ui - main.cpp - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic +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(dials WIN32 MACOSX_BUNDLE + dials.ui + main.cpp +) +target_link_libraries(dials PUBLIC + Qt::Widgets +) + +install(TARGETS dials + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/touch/fingerpaint/CMakeLists.txt b/examples/widgets/touch/fingerpaint/CMakeLists.txt index 82ec8cd91e..a419a614be 100644 --- a/examples/widgets/touch/fingerpaint/CMakeLists.txt +++ b/examples/widgets/touch/fingerpaint/CMakeLists.txt @@ -1,25 +1,34 @@ # Generated from fingerpaint.pro. -##################################################################### -## fingerpaint Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(fingerpaint LANGUAGES CXX) -add_qt_executable(fingerpaint - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/fingerpaint" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/fingerpaint" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - scribblearea.cpp scribblearea.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") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS PrintSupport) # special case + +add_executable(fingerpaint WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h + scribblearea.cpp scribblearea.h +) +target_link_libraries(fingerpaint PUBLIC + Qt::Widgets +) +# special case begin +if (TARGET Qt::PrintSupport) + target_link_libraries(fingerpaint PUBLIC Qt::PrintSupport) +endif() +# special case end -extend_target(fingerpaint CONDITION TARGET Qt::PrintSupport - LIBRARIES - Qt::PrintSupport +install(TARGETS fingerpaint + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/touch/knobs/CMakeLists.txt b/examples/widgets/touch/knobs/CMakeLists.txt index e8976db270..4a8f55820a 100644 --- a/examples/widgets/touch/knobs/CMakeLists.txt +++ b/examples/widgets/touch/knobs/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from knobs.pro. -##################################################################### -## knobs Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(knobs LANGUAGES CXX) -add_qt_executable(knobs - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/knobs" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/knobs" - SOURCES - knob.cpp knob.h - main.cpp - 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(knobs WIN32 MACOSX_BUNDLE + knob.cpp knob.h + main.cpp +) +target_link_libraries(knobs PUBLIC + Qt::Widgets +) + +install(TARGETS knobs + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/touch/pinchzoom/CMakeLists.txt b/examples/widgets/touch/pinchzoom/CMakeLists.txt index 92d7b4c3b3..379dde1e9f 100644 --- a/examples/widgets/touch/pinchzoom/CMakeLists.txt +++ b/examples/widgets/touch/pinchzoom/CMakeLists.txt @@ -1,22 +1,29 @@ # Generated from pinchzoom.pro. -##################################################################### -## pinchzoom Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(pinchzoom LANGUAGES CXX) -add_qt_executable(pinchzoom - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/pinchzoom" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/pinchzoom" - SOURCES - graphicsview.cpp graphicsview.h - main.cpp - mouse.cpp mouse.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(pinchzoom "mice" PREFIX "/" FILES - images/cheese.jpg) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(pinchzoom WIN32 MACOSX_BUNDLE + graphicsview.cpp graphicsview.h + main.cpp + mice.qrc + mouse.cpp mouse.h +) +target_link_libraries(pinchzoom PUBLIC + Qt::Widgets +) + +install(TARGETS pinchzoom + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt index dcfc424a24..14533cb8dc 100644 --- a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from part1.pro. -##################################################################### -## part1 Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(part1 LANGUAGES CXX) -add_qt_executable(part1 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part1" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part1" - SOURCES - addressbook.cpp addressbook.h - main.cpp - 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(part1 WIN32 MACOSX_BUNDLE + addressbook.cpp addressbook.h + main.cpp +) +target_link_libraries(part1 PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:part1.pro:<NONE>: -# QMAKE_PROJECT_NAME = "ab_part1" +install(TARGETS part1 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt index b9fe9307ee..aace9f86af 100644 --- a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from part2.pro. -##################################################################### -## part2 Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(part2 LANGUAGES CXX) -add_qt_executable(part2 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part2" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part2" - SOURCES - addressbook.cpp addressbook.h - main.cpp - 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(part2 WIN32 MACOSX_BUNDLE + addressbook.cpp addressbook.h + main.cpp +) +target_link_libraries(part2 PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:part2.pro:<NONE>: -# QMAKE_PROJECT_NAME = "ab_part2" +install(TARGETS part2 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt index f83a8c5379..b9fadf57d0 100644 --- a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from part3.pro. -##################################################################### -## part3 Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(part3 LANGUAGES CXX) -add_qt_executable(part3 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part3" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part3" - SOURCES - addressbook.cpp addressbook.h - main.cpp - 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(part3 WIN32 MACOSX_BUNDLE + addressbook.cpp addressbook.h + main.cpp +) +target_link_libraries(part3 PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:part3.pro:<NONE>: -# QMAKE_PROJECT_NAME = "ab_part3" +install(TARGETS part3 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt index 0dee5fab9a..af8dfd4904 100644 --- a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from part4.pro. -##################################################################### -## part4 Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(part4 LANGUAGES CXX) -add_qt_executable(part4 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part4" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part4" - SOURCES - addressbook.cpp addressbook.h - main.cpp - 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(part4 WIN32 MACOSX_BUNDLE + addressbook.cpp addressbook.h + main.cpp +) +target_link_libraries(part4 PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:part4.pro:<NONE>: -# QMAKE_PROJECT_NAME = "ab_part4" +install(TARGETS part4 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt index 564f044ba8..eec0af2bac 100644 --- a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt @@ -1,20 +1,28 @@ # Generated from part5.pro. -##################################################################### -## part5 Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(part5 LANGUAGES CXX) -add_qt_executable(part5 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part5" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part5" - SOURCES - addressbook.cpp addressbook.h - finddialog.cpp finddialog.h - main.cpp - 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(part5 WIN32 MACOSX_BUNDLE + addressbook.cpp addressbook.h + finddialog.cpp finddialog.h + main.cpp +) +target_link_libraries(part5 PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:part5.pro:<NONE>: -# QMAKE_PROJECT_NAME = "ab_part5" +install(TARGETS part5 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt index 375f1f0612..294f16a26d 100644 --- a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt @@ -1,20 +1,28 @@ # Generated from part6.pro. -##################################################################### -## part6 Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(part6 LANGUAGES CXX) -add_qt_executable(part6 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part6" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part6" - SOURCES - addressbook.cpp addressbook.h - finddialog.cpp finddialog.h - main.cpp - 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(part6 WIN32 MACOSX_BUNDLE + addressbook.cpp addressbook.h + finddialog.cpp finddialog.h + main.cpp +) +target_link_libraries(part6 PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:part6.pro:<NONE>: -# QMAKE_PROJECT_NAME = "ab_part6" +install(TARGETS part6 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt index 1ccd87fff5..3d50ebcc6c 100644 --- a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt @@ -1,20 +1,28 @@ # Generated from part7.pro. -##################################################################### -## part7 Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(part7 LANGUAGES CXX) -add_qt_executable(part7 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part7" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part7" - SOURCES - addressbook.cpp addressbook.h - finddialog.cpp finddialog.h - main.cpp - 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(part7 WIN32 MACOSX_BUNDLE + addressbook.cpp addressbook.h + finddialog.cpp finddialog.h + main.cpp +) +target_link_libraries(part7 PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:part7.pro:<NONE>: -# QMAKE_PROJECT_NAME = "ab_part7" +install(TARGETS part7 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt index c39133d235..50f6e31364 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from part1.pro. -##################################################################### -## part1 Binary: -##################################################################### - -add_qt_executable(part1 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part1" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part1" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(part1 LANGUAGES CXX) + +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(part1 WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(part1 PUBLIC + Qt::Widgets +) + +install(TARGETS part1 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt index ff9ddd6584..9df643de4a 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from part2.pro. -##################################################################### -## part2 Binary: -##################################################################### - -add_qt_executable(part2 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part2" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part2" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(part2 LANGUAGES CXX) + +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(part2 WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(part2 PUBLIC + Qt::Widgets +) + +install(TARGETS part2 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt index 2564472be6..048d2d60ab 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from part3.pro. -##################################################################### -## part3 Binary: -##################################################################### - -add_qt_executable(part3 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part3" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part3" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(part3 LANGUAGES CXX) + +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(part3 WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(part3 PUBLIC + Qt::Widgets +) + +install(TARGETS part3 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt index 473b803044..c752b44d04 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from part4.pro. -##################################################################### -## part4 Binary: -##################################################################### - -add_qt_executable(part4 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part4" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part4" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(part4 LANGUAGES CXX) + +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(part4 WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(part4 PUBLIC + Qt::Widgets +) + +install(TARGETS part4 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt index 93d2ea4175..fc4fd05b6e 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from part5.pro. -##################################################################### -## part5 Binary: -##################################################################### - -add_qt_executable(part5 - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part5" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part5" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(part5 LANGUAGES CXX) + +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(part5 WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(part5 PUBLIC + Qt::Widgets +) + +install(TARGETS part5 + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt index 1edda802f9..82e1b4dbab 100644 --- a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from 1_readonly.pro. -##################################################################### -## mv_readonly Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(mv_readonly LANGUAGES CXX) -add_qt_executable(mv_readonly - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/1_readonly" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/1_readonly" - SOURCES - main.cpp - mymodel.cpp mymodel.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(mv_readonly WIN32 MACOSX_BUNDLE + main.cpp + mymodel.cpp mymodel.h +) +target_link_libraries(mv_readonly PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:1_readonly.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS mv_readonly + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt index 3235275d6a..898df9bfbf 100644 --- a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from 2_formatting.pro. -##################################################################### -## mv_formatting Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(mv_formatting LANGUAGES CXX) -add_qt_executable(mv_formatting - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/2_formatting" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/2_formatting" - SOURCES - main.cpp - mymodel.cpp mymodel.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(mv_formatting WIN32 MACOSX_BUNDLE + main.cpp + mymodel.cpp mymodel.h +) +target_link_libraries(mv_formatting PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:2_formatting.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS mv_formatting + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt index 746bafc19a..b460b7b281 100644 --- a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from 3_changingmodel.pro. -##################################################################### -## mv_changingmodel Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(mv_changingmodel LANGUAGES CXX) -add_qt_executable(mv_changingmodel - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/3_changingmodel" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/3_changingmodel" - SOURCES - main.cpp - mymodel.cpp mymodel.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(mv_changingmodel WIN32 MACOSX_BUNDLE + main.cpp + mymodel.cpp mymodel.h +) +target_link_libraries(mv_changingmodel PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:3_changingmodel.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS mv_changingmodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt index ef7e0a501b..e76299ee0c 100644 --- a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from 4_headers.pro. -##################################################################### -## mv_headers Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(mv_headers LANGUAGES CXX) -add_qt_executable(mv_headers - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/4_headers" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/4_headers" - SOURCES - main.cpp - mymodel.cpp mymodel.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(mv_headers WIN32 MACOSX_BUNDLE + main.cpp + mymodel.cpp mymodel.h +) +target_link_libraries(mv_headers PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:4_headers.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS mv_headers + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt index 2ce884a7fe..ceb2ef0ed5 100644 --- a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt @@ -1,20 +1,28 @@ # Generated from 5_edit.pro. -##################################################################### -## mv_edit Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(mv_edit LANGUAGES CXX) -add_qt_executable(mv_edit - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/5_edit" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/5_edit" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - mymodel.cpp mymodel.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(mv_edit WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h + mymodel.cpp mymodel.h +) +target_link_libraries(mv_edit PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:5_edit.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS mv_edit + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt index 1d5a9425e5..f6409036fd 100644 --- a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from 6_treeview.pro. -##################################################################### -## mv_tree Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(mv_tree LANGUAGES CXX) -add_qt_executable(mv_tree - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/6_treeview" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/6_treeview" - 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(mv_tree WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(mv_tree PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:6_treeview.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS mv_tree + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt index 0560dc7a60..f328863a1f 100644 --- a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from 7_selections.pro. -##################################################################### -## mv_selections Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(mv_selections LANGUAGES CXX) -add_qt_executable(mv_selections - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/7_selections" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/7_selections" - 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(mv_selections WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(mv_selections PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:7_selections.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS mv_selections + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tutorials/notepad/CMakeLists.txt b/examples/widgets/tutorials/notepad/CMakeLists.txt index d34d3ca846..fee3e14285 100644 --- a/examples/widgets/tutorials/notepad/CMakeLists.txt +++ b/examples/widgets/tutorials/notepad/CMakeLists.txt @@ -1,51 +1,35 @@ # Generated from notepad.pro. -##################################################################### -## notepad Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(notepad LANGUAGES CXX) -add_qt_executable(notepad - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/notepad" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/notepad" - SOURCES - main.cpp - notepad.cpp notepad.h notepad.ui - ENABLE_AUTOGEN_TOOLS - uic - LIBRARIES # special case - Qt::Widgets # special case -) - -# Resources: -add_qt_resource(notepad "notepad" PREFIX "/" FILES - images/bold.png - images/copy.png - images/create.png - images/cut.png - images/edit_redo.png - images/edit_undo.png - images/exit.png - images/font.png - images/info.png - images/italic.png - images/new.png - images/open.png - images/paste.png - images/pencil.png - images/print.png - images/save.png - images/save_as.png - images/underline.png) +find_package(Qt5 COMPONENTS Widgets) # special case: add +find_package(Qt5 COMPONENTS PrintSupport) # special case: add +set(CMAKE_INCLUDE_CURRENT_DIR ON) -#### Keys ignored in scope 1:.:.:notepad.pro:<TRUE>: -# TEMPLATE = "app" +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -## Scopes: -##################################################################### +set(INSTALL_EXAMPLEDIR "examples") -extend_target(notepad CONDITION TARGET Qt::PrintSupport - PUBLIC_LIBRARIES +add_executable(notepad WIN32 MACOSX_BUNDLE + main.cpp + notepad.cpp notepad.h notepad.qrc notepad.ui +) +# special case begin +target_link_libraries(notepad PUBLIC + Qt::Widgets +) +if (TARGET Qt::PrintSupport) + target_link_libraries(notepad PUBLIC Qt::PrintSupport + ) +endif() +# special case end + +install(TARGETS notepad + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt index 823098c9fc..6725ad69f5 100644 --- a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt +++ b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from childwidget.pro. -##################################################################### -## childwidget Binary: -##################################################################### - -add_qt_executable(childwidget - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/childwidget" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/childwidget" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(childwidget LANGUAGES CXX) + +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(childwidget WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(childwidget PUBLIC + Qt::Widgets +) + +install(TARGETS childwidget + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt index 7f88c89d80..32ca867208 100644 --- a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt +++ b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from nestedlayouts.pro. -##################################################################### -## nestedlayouts Binary: -##################################################################### - -add_qt_executable(nestedlayouts - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/nestedlayouts" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/nestedlayouts" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(nestedlayouts LANGUAGES CXX) + +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(nestedlayouts WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(nestedlayouts PUBLIC + Qt::Widgets +) + +install(TARGETS nestedlayouts + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt index 2ef630033b..b18e09a278 100644 --- a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt +++ b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from toplevel.pro. -##################################################################### -## toplevel Binary: -##################################################################### - -add_qt_executable(toplevel - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/toplevel" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/toplevel" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(toplevel LANGUAGES CXX) + +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(toplevel WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(toplevel PUBLIC + Qt::Widgets +) + +install(TARGETS toplevel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt index 157865b68c..4d8899227a 100644 --- a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt +++ b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt @@ -1,15 +1,26 @@ # Generated from windowlayout.pro. -##################################################################### -## windowlayout Binary: -##################################################################### - -add_qt_executable(windowlayout - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/windowlayout" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/windowlayout" - SOURCES - main.cpp - LIBRARIES - Qt::Widgets +cmake_minimum_required(VERSION 3.14) +project(windowlayout LANGUAGES CXX) + +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(windowlayout WIN32 MACOSX_BUNDLE + main.cpp +) +target_link_libraries(windowlayout PUBLIC + Qt::Widgets +) + +install(TARGETS windowlayout + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/analogclock/CMakeLists.txt b/examples/widgets/widgets/analogclock/CMakeLists.txt index 890a300294..064b9f23e8 100644 --- a/examples/widgets/widgets/analogclock/CMakeLists.txt +++ b/examples/widgets/widgets/analogclock/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from analogclock.pro. -##################################################################### -## analogclock Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(analogclock LANGUAGES CXX) -add_qt_executable(analogclock_widgets # special case - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/analogclock" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/analogclock" - SOURCES - analogclock.cpp analogclock.h - main.cpp - 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(analogclock WIN32 MACOSX_BUNDLE + analogclock.cpp analogclock.h + main.cpp +) +target_link_libraries(analogclock PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:analogclock.pro:<NONE>: -# QMAKE_PROJECT_NAME = "widgets_analogclock" +install(TARGETS analogclock + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/calculator/CMakeLists.txt b/examples/widgets/widgets/calculator/CMakeLists.txt index b4f58b4f39..779272f31a 100644 --- a/examples/widgets/widgets/calculator/CMakeLists.txt +++ b/examples/widgets/widgets/calculator/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from calculator.pro. -##################################################################### -## calculator Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(calculator LANGUAGES CXX) -add_qt_executable(calculator - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/calculator" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/calculator" - SOURCES - button.cpp button.h - calculator.cpp calculator.h - main.cpp - 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(calculator WIN32 MACOSX_BUNDLE + button.cpp button.h + calculator.cpp calculator.h + main.cpp +) +target_link_libraries(calculator PUBLIC + Qt::Widgets +) + +install(TARGETS calculator + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/calendarwidget/CMakeLists.txt b/examples/widgets/widgets/calendarwidget/CMakeLists.txt index 463fce3849..ed496bdad7 100644 --- a/examples/widgets/widgets/calendarwidget/CMakeLists.txt +++ b/examples/widgets/widgets/calendarwidget/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from calendarwidget.pro. -##################################################################### -## calendarwidget Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(calendarwidget LANGUAGES CXX) -add_qt_executable(calendarwidget - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/calendarwidget" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/calendarwidget" - SOURCES - main.cpp - window.cpp window.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(calendarwidget WIN32 MACOSX_BUNDLE + main.cpp + window.cpp window.h +) +target_link_libraries(calendarwidget PUBLIC + Qt::Widgets +) + +install(TARGETS calendarwidget + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/charactermap/CMakeLists.txt b/examples/widgets/widgets/charactermap/CMakeLists.txt index a09b63a4f7..f397822c59 100644 --- a/examples/widgets/widgets/charactermap/CMakeLists.txt +++ b/examples/widgets/widgets/charactermap/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from charactermap.pro. -##################################################################### -## charactermap Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(charactermap LANGUAGES CXX) -add_qt_executable(charactermap - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/charactermap" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/charactermap" - SOURCES - characterwidget.cpp characterwidget.h - 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(charactermap WIN32 MACOSX_BUNDLE + characterwidget.cpp characterwidget.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(charactermap PUBLIC + Qt::Widgets +) + +install(TARGETS charactermap + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/codeeditor/CMakeLists.txt b/examples/widgets/widgets/codeeditor/CMakeLists.txt index 7c29d383ff..f352b060cb 100644 --- a/examples/widgets/widgets/codeeditor/CMakeLists.txt +++ b/examples/widgets/widgets/codeeditor/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from codeeditor.pro. -##################################################################### -## codeeditor Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(codeeditor LANGUAGES CXX) -add_qt_executable(codeeditor - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/codeeditor" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/codeeditor" - SOURCES - codeeditor.cpp codeeditor.h - main.cpp - 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(codeeditor WIN32 MACOSX_BUNDLE + codeeditor.cpp codeeditor.h + main.cpp +) +target_link_libraries(codeeditor PUBLIC + Qt::Widgets +) + +install(TARGETS codeeditor + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/digitalclock/CMakeLists.txt b/examples/widgets/widgets/digitalclock/CMakeLists.txt index b85528a1e8..505e6a67b6 100644 --- a/examples/widgets/widgets/digitalclock/CMakeLists.txt +++ b/examples/widgets/widgets/digitalclock/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from digitalclock.pro. -##################################################################### -## digitalclock Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(digitalclock LANGUAGES CXX) -add_qt_executable(digitalclock - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/digitalclock" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/digitalclock" - SOURCES - digitalclock.cpp digitalclock.h - main.cpp - 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(digitalclock WIN32 MACOSX_BUNDLE + digitalclock.cpp digitalclock.h + main.cpp +) +target_link_libraries(digitalclock PUBLIC + Qt::Widgets +) + +install(TARGETS digitalclock + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/elidedlabel/CMakeLists.txt b/examples/widgets/widgets/elidedlabel/CMakeLists.txt index b894e18692..1efb7a1bb3 100644 --- a/examples/widgets/widgets/elidedlabel/CMakeLists.txt +++ b/examples/widgets/widgets/elidedlabel/CMakeLists.txt @@ -1,21 +1,32 @@ # Generated from elidedlabel.pro. -##################################################################### -## elidedlabel Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(elidedlabel LANGUAGES CXX) -add_qt_executable(elidedlabel - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/elidedlabel" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/elidedlabel" - SOURCES - elidedlabel.cpp elidedlabel.h - main.cpp - testwidget.cpp testwidget.h - LIBRARIES - Qt::Gui - 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 Core) +find_package(Qt5 COMPONENTS Gui) +find_package(Qt5 COMPONENTS Widgets) + +add_executable(elidedlabel WIN32 MACOSX_BUNDLE + elidedlabel.cpp elidedlabel.h + main.cpp + testwidget.cpp testwidget.h +) +target_link_libraries(elidedlabel PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets ) -#### Keys ignored in scope 1:.:elidedlabel.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS elidedlabel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/groupbox/CMakeLists.txt b/examples/widgets/widgets/groupbox/CMakeLists.txt index 1d77ab37dc..0b13e4587d 100644 --- a/examples/widgets/widgets/groupbox/CMakeLists.txt +++ b/examples/widgets/widgets/groupbox/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from groupbox.pro. -##################################################################### -## groupbox Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(groupbox LANGUAGES CXX) -add_qt_executable(groupbox - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/groupbox" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/groupbox" - SOURCES - main.cpp - window.cpp window.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(groupbox WIN32 MACOSX_BUNDLE + main.cpp + window.cpp window.h +) +target_link_libraries(groupbox PUBLIC + Qt::Widgets +) + +install(TARGETS groupbox + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/icons/CMakeLists.txt b/examples/widgets/widgets/icons/CMakeLists.txt index 34d9bcec94..ef20d8d2b0 100644 --- a/examples/widgets/widgets/icons/CMakeLists.txt +++ b/examples/widgets/widgets/icons/CMakeLists.txt @@ -1,24 +1,32 @@ # Generated from icons.pro. -##################################################################### -## icons Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(icons LANGUAGES CXX) -add_qt_executable(icons - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/icons" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/icons" - SOURCES - iconpreviewarea.cpp iconpreviewarea.h - iconsizespinbox.cpp iconsizespinbox.h - imagedelegate.cpp imagedelegate.h - main.cpp - mainwindow.cpp mainwindow.h - DEFINES - SRCDIR=\\\"/\\\" - 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) -#### Keys ignored in scope 1:.:icons.pro:<NONE>: -# EXAMPLE_FILES = "images/*" +add_executable(icons WIN32 MACOSX_BUNDLE + iconpreviewarea.cpp iconpreviewarea.h + iconsizespinbox.cpp iconsizespinbox.h + imagedelegate.cpp imagedelegate.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_compile_definitions(icons PUBLIC + SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}" +) +target_link_libraries(icons PUBLIC + Qt::Widgets +) +install(TARGETS icons + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/imageviewer/CMakeLists.txt b/examples/widgets/widgets/imageviewer/CMakeLists.txt index 4684653e64..49695865c7 100644 --- a/examples/widgets/widgets/imageviewer/CMakeLists.txt +++ b/examples/widgets/widgets/imageviewer/CMakeLists.txt @@ -1,24 +1,33 @@ # Generated from imageviewer.pro. -##################################################################### -## imageviewer Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(imageviewer LANGUAGES CXX) -add_qt_executable(imageviewer - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/imageviewer" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/imageviewer" - SOURCES - imageviewer.cpp imageviewer.h - main.cpp - 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") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS PrintSupport) # special case + +add_executable(imageviewer WIN32 MACOSX_BUNDLE + imageviewer.cpp imageviewer.h + main.cpp +) +target_link_libraries(imageviewer PUBLIC + Qt::Widgets +) +# special case begin +if (TARGET Qt::PrintSupport) + target_link_libraries(imageviewer PUBLIC Qt::PrintSupport) +endif() +# special case end -extend_target(imageviewer CONDITION TARGET Qt::PrintSupport - LIBRARIES - Qt::PrintSupport +install(TARGETS imageviewer + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/lineedits/CMakeLists.txt b/examples/widgets/widgets/lineedits/CMakeLists.txt index 59406a703d..eb8f210f6c 100644 --- a/examples/widgets/widgets/lineedits/CMakeLists.txt +++ b/examples/widgets/widgets/lineedits/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from lineedits.pro. -##################################################################### -## lineedits Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(lineedits LANGUAGES CXX) -add_qt_executable(lineedits - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/lineedits" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/lineedits" - SOURCES - main.cpp - window.cpp window.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(lineedits WIN32 MACOSX_BUNDLE + main.cpp + window.cpp window.h +) +target_link_libraries(lineedits PUBLIC + Qt::Widgets +) + +install(TARGETS lineedits + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/mousebuttons/CMakeLists.txt b/examples/widgets/widgets/mousebuttons/CMakeLists.txt index 6ec817458c..2746ca670a 100644 --- a/examples/widgets/widgets/mousebuttons/CMakeLists.txt +++ b/examples/widgets/widgets/mousebuttons/CMakeLists.txt @@ -1,19 +1,29 @@ # Generated from mousebuttons.pro. -##################################################################### -## mousebuttons Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(mousebuttons LANGUAGES CXX) -add_qt_executable(mousebuttons - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/mousebuttons" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/mousebuttons" - SOURCES - buttontester.cpp buttontester.h - main.cpp - 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 Core) +find_package(Qt5 COMPONENTS Widgets) + +add_executable(mousebuttons WIN32 MACOSX_BUNDLE + buttontester.cpp buttontester.h + main.cpp +) +target_link_libraries(mousebuttons PUBLIC + Qt::Core + Qt::Widgets ) -#### Keys ignored in scope 1:.:mousebuttons.pro:<NONE>: -# TEMPLATE = "app" +install(TARGETS mousebuttons + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/movie/CMakeLists.txt b/examples/widgets/widgets/movie/CMakeLists.txt index 0df3465fea..b96cce628e 100644 --- a/examples/widgets/widgets/movie/CMakeLists.txt +++ b/examples/widgets/widgets/movie/CMakeLists.txt @@ -1,19 +1,27 @@ # Generated from movie.pro. -##################################################################### -## movie Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(movie LANGUAGES CXX) -add_qt_executable(movie - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/movie" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/movie" - SOURCES - main.cpp - movieplayer.cpp movieplayer.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(movie WIN32 MACOSX_BUNDLE + main.cpp + movieplayer.cpp movieplayer.h +) +target_link_libraries(movie PUBLIC + Qt::Widgets ) -#### Keys ignored in scope 1:.:movie.pro:<NONE>: -# EXAMPLE_FILES = "animation.gif" +install(TARGETS movie + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/scribble/CMakeLists.txt b/examples/widgets/widgets/scribble/CMakeLists.txt index d9b2292336..51db261f22 100644 --- a/examples/widgets/widgets/scribble/CMakeLists.txt +++ b/examples/widgets/widgets/scribble/CMakeLists.txt @@ -1,25 +1,34 @@ # Generated from scribble.pro. -##################################################################### -## scribble Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(scribble LANGUAGES CXX) -add_qt_executable(scribble - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/scribble" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/scribble" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - scribblearea.cpp scribblearea.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") -## Scopes: -##################################################################### +find_package(Qt5 COMPONENTS Widgets) +find_package(Qt5 COMPONENTS PrintSupport) # special case + +add_executable(scribble WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h + scribblearea.cpp scribblearea.h +) +target_link_libraries(scribble PUBLIC + Qt::Widgets +) +# special case begin +if (TARGET Qt::PrintSupport) + target_link_libraries(scribble PUBLIC Qt::PrintSupport) +endif() +# special case end -extend_target(scribble CONDITION TARGET Qt::PrintSupport - LIBRARIES - Qt::PrintSupport +install(TARGETS scribble + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/shapedclock/CMakeLists.txt b/examples/widgets/widgets/shapedclock/CMakeLists.txt index ab199d6981..144d3006c5 100644 --- a/examples/widgets/widgets/shapedclock/CMakeLists.txt +++ b/examples/widgets/widgets/shapedclock/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from shapedclock.pro. -##################################################################### -## shapedclock Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(shapedclock LANGUAGES CXX) -add_qt_executable(shapedclock - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/shapedclock" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/shapedclock" - SOURCES - main.cpp - shapedclock.cpp shapedclock.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(shapedclock WIN32 MACOSX_BUNDLE + main.cpp + shapedclock.cpp shapedclock.h +) +target_link_libraries(shapedclock PUBLIC + Qt::Widgets +) + +install(TARGETS shapedclock + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/sliders/CMakeLists.txt b/examples/widgets/widgets/sliders/CMakeLists.txt index a064ad5a4a..bfdd22a7cc 100644 --- a/examples/widgets/widgets/sliders/CMakeLists.txt +++ b/examples/widgets/widgets/sliders/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from sliders.pro. -##################################################################### -## sliders Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(sliders LANGUAGES CXX) -add_qt_executable(sliders - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/sliders" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/sliders" - SOURCES - main.cpp - slidersgroup.cpp slidersgroup.h - window.cpp window.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(sliders WIN32 MACOSX_BUNDLE + main.cpp + slidersgroup.cpp slidersgroup.h + window.cpp window.h +) +target_link_libraries(sliders PUBLIC + Qt::Widgets +) + +install(TARGETS sliders + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/spinboxes/CMakeLists.txt b/examples/widgets/widgets/spinboxes/CMakeLists.txt index 8635f06a8e..680ecad2a8 100644 --- a/examples/widgets/widgets/spinboxes/CMakeLists.txt +++ b/examples/widgets/widgets/spinboxes/CMakeLists.txt @@ -1,16 +1,27 @@ # Generated from spinboxes.pro. -##################################################################### -## spinboxes Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(spinboxes LANGUAGES CXX) -add_qt_executable(spinboxes - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/spinboxes" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/spinboxes" - SOURCES - main.cpp - window.cpp window.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(spinboxes WIN32 MACOSX_BUNDLE + main.cpp + window.cpp window.h +) +target_link_libraries(spinboxes PUBLIC + Qt::Widgets +) + +install(TARGETS spinboxes + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/styles/CMakeLists.txt b/examples/widgets/widgets/styles/CMakeLists.txt index d33d90a5bc..e0db35653c 100644 --- a/examples/widgets/widgets/styles/CMakeLists.txt +++ b/examples/widgets/widgets/styles/CMakeLists.txt @@ -1,23 +1,29 @@ # Generated from styles.pro. -##################################################################### -## styles Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(styles LANGUAGES CXX) -add_qt_executable(styles - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/styles" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/styles" - SOURCES - main.cpp - norwegianwoodstyle.cpp norwegianwoodstyle.h - widgetgallery.cpp widgetgallery.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(styles "styles" FILES - images/woodbackground.png - images/woodbutton.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(styles WIN32 MACOSX_BUNDLE + main.cpp + norwegianwoodstyle.cpp norwegianwoodstyle.h + styles.qrc + widgetgallery.cpp widgetgallery.h +) +target_link_libraries(styles PUBLIC + Qt::Widgets +) + +install(TARGETS styles + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/stylesheet/CMakeLists.txt b/examples/widgets/widgets/stylesheet/CMakeLists.txt index 227eb13b68..7e99a39695 100644 --- a/examples/widgets/widgets/stylesheet/CMakeLists.txt +++ b/examples/widgets/widgets/stylesheet/CMakeLists.txt @@ -1,58 +1,29 @@ # Generated from stylesheet.pro. -##################################################################### -## stylesheet Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(stylesheet LANGUAGES CXX) -add_qt_executable(stylesheet - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/stylesheet" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/stylesheet" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h mainwindow.ui - stylesheeteditor.cpp stylesheeteditor.h stylesheeteditor.ui - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -# Resources: -add_qt_resource(stylesheet "stylesheet" PREFIX "/" FILES - images/checkbox_checked.png - images/checkbox_checked_hover.png - images/checkbox_checked_pressed.png - images/checkbox_unchecked.png - images/checkbox_unchecked_hover.png - images/checkbox_unchecked_pressed.png - images/down_arrow.png - images/down_arrow_disabled.png - images/frame.png - images/pagefold.png - images/pushbutton.png - images/pushbutton_hover.png - images/pushbutton_pressed.png - images/radiobutton_checked.png - images/radiobutton_checked_hover.png - images/radiobutton_checked_pressed.png - images/radiobutton_unchecked.png - images/radiobutton_unchecked_hover.png - images/radiobutton_unchecked_pressed.png - images/sizegrip.png - images/spindown.png - images/spindown_hover.png - images/spindown_off.png - images/spindown_pressed.png - images/spinup.png - images/spinup_hover.png - images/spinup_off.png - images/spinup_pressed.png - images/up_arrow.png - images/up_arrow_disabled.png - layouts/default.ui - layouts/pagefold.ui - qss/coffee.qss - qss/default.qss - qss/pagefold.qss) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(stylesheet WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp mainwindow.h mainwindow.ui + stylesheet.qrc + stylesheeteditor.cpp stylesheeteditor.h stylesheeteditor.ui +) +target_link_libraries(stylesheet PUBLIC + Qt::Widgets +) + +install(TARGETS stylesheet + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/tablet/CMakeLists.txt b/examples/widgets/widgets/tablet/CMakeLists.txt index f23fe7ec71..febec2afd0 100644 --- a/examples/widgets/widgets/tablet/CMakeLists.txt +++ b/examples/widgets/widgets/tablet/CMakeLists.txt @@ -1,26 +1,30 @@ # Generated from tablet.pro. -##################################################################### -## qttablet Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(qttablet LANGUAGES CXX) -add_qt_executable(qttablet - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tablet" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tablet" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - tabletapplication.cpp tabletapplication.h - tabletcanvas.cpp tabletcanvas.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(qttablet "images" FILES - images/cursor-airbrush.png - images/cursor-eraser.png - images/cursor-felt-marker.png - images/cursor-pencil.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(qttablet WIN32 MACOSX_BUNDLE + images.qrc + main.cpp + mainwindow.cpp mainwindow.h + tabletapplication.cpp tabletapplication.h + tabletcanvas.cpp tabletcanvas.h +) +target_link_libraries(qttablet PUBLIC + Qt::Widgets +) + +install(TARGETS qttablet + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/tetrix/CMakeLists.txt b/examples/widgets/widgets/tetrix/CMakeLists.txt index 002667a6b9..ec79577928 100644 --- a/examples/widgets/widgets/tetrix/CMakeLists.txt +++ b/examples/widgets/widgets/tetrix/CMakeLists.txt @@ -1,18 +1,29 @@ # Generated from tetrix.pro. -##################################################################### -## tetrix Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(tetrix LANGUAGES CXX) -add_qt_executable(tetrix - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tetrix" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tetrix" - SOURCES - main.cpp - tetrixboard.cpp tetrixboard.h - tetrixpiece.cpp tetrixpiece.h - tetrixwindow.cpp tetrixwindow.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(tetrix WIN32 MACOSX_BUNDLE + main.cpp + tetrixboard.cpp tetrixboard.h + tetrixpiece.cpp tetrixpiece.h + tetrixwindow.cpp tetrixwindow.h +) +target_link_libraries(tetrix PUBLIC + Qt::Widgets +) + +install(TARGETS tetrix + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/tooltips/CMakeLists.txt b/examples/widgets/widgets/tooltips/CMakeLists.txt index 02d773858a..90601659f6 100644 --- a/examples/widgets/widgets/tooltips/CMakeLists.txt +++ b/examples/widgets/widgets/tooltips/CMakeLists.txt @@ -1,24 +1,29 @@ # Generated from tooltips.pro. -##################################################################### -## tooltips Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(tooltips LANGUAGES CXX) -add_qt_executable(tooltips - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tooltips" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tooltips" - SOURCES - main.cpp - shapeitem.cpp shapeitem.h - sortingbox.cpp sortingbox.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(tooltips "tooltips" FILES - images/circle.png - images/square.png - images/triangle.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(tooltips WIN32 MACOSX_BUNDLE + main.cpp + shapeitem.cpp shapeitem.h + sortingbox.cpp sortingbox.h + tooltips.qrc +) +target_link_libraries(tooltips PUBLIC + Qt::Widgets +) + +install(TARGETS tooltips + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/validators/CMakeLists.txt b/examples/widgets/widgets/validators/CMakeLists.txt index ef981d9eb7..b09d10dd9a 100644 --- a/examples/widgets/widgets/validators/CMakeLists.txt +++ b/examples/widgets/widgets/validators/CMakeLists.txt @@ -1,27 +1,30 @@ # Generated from validators.pro. -##################################################################### -## validators Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(validators LANGUAGES CXX) -add_qt_executable(validators - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/validators" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/validators" - SOURCES - ledwidget.cpp ledwidget.h - localeselector.cpp localeselector.h - main.cpp - validators.ui - validatorwidget.cpp validatorwidget.h - PUBLIC_LIBRARIES - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -# Resources: -add_qt_resource(validators "validators" PREFIX "/" FILES - ledoff.png - ledon.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(validators WIN32 MACOSX_BUNDLE + ledwidget.cpp ledwidget.h + localeselector.cpp localeselector.h + main.cpp + validators.qrc validators.ui + validatorwidget.cpp validatorwidget.h +) +target_link_libraries(validators PUBLIC + Qt::Widgets +) + +install(TARGETS validators + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/widgets/wiggly/CMakeLists.txt b/examples/widgets/widgets/wiggly/CMakeLists.txt index cc8c0befbf..2fabcafb0e 100644 --- a/examples/widgets/widgets/wiggly/CMakeLists.txt +++ b/examples/widgets/widgets/wiggly/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from wiggly.pro. -##################################################################### -## wiggly Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(wiggly LANGUAGES CXX) -add_qt_executable(wiggly - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/wiggly" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/wiggly" - SOURCES - dialog.cpp dialog.h - main.cpp - wigglywidget.cpp wigglywidget.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(wiggly WIN32 MACOSX_BUNDLE + dialog.cpp dialog.h + main.cpp + wigglywidget.cpp wigglywidget.h +) +target_link_libraries(wiggly PUBLIC + Qt::Widgets +) + +install(TARGETS wiggly + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/widgets/windowflags/CMakeLists.txt b/examples/widgets/widgets/windowflags/CMakeLists.txt index aa2eff0088..0eab6f6452 100644 --- a/examples/widgets/widgets/windowflags/CMakeLists.txt +++ b/examples/widgets/widgets/windowflags/CMakeLists.txt @@ -1,17 +1,28 @@ # Generated from windowflags.pro. -##################################################################### -## windowflags Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(windowflags LANGUAGES CXX) -add_qt_executable(windowflags - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/windowflags" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/windowflags" - SOURCES - controllerwindow.cpp controllerwindow.h - main.cpp - previewwindow.cpp previewwindow.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(windowflags WIN32 MACOSX_BUNDLE + controllerwindow.cpp controllerwindow.h + main.cpp + previewwindow.cpp previewwindow.h +) +target_link_libraries(windowflags PUBLIC + Qt::Widgets +) + +install(TARGETS windowflags + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/windowcontainer/CMakeLists.txt b/examples/widgets/windowcontainer/CMakeLists.txt index 88dc37ea5e..f67a6515bd 100644 --- a/examples/widgets/windowcontainer/CMakeLists.txt +++ b/examples/widgets/windowcontainer/CMakeLists.txt @@ -1,18 +1,30 @@ # Generated from windowcontainer.pro. -##################################################################### -## windowcontainer Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(windowcontainer LANGUAGES CXX) -add_qt_executable(windowcontainer - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/windowcontainer" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/windowcontainer" - SOURCES - ../../gui/openglwindow/openglwindow.cpp ../../gui/openglwindow/openglwindow.h - windowcontainer.cpp - INCLUDE_DIRECTORIES - ../../gui/openglwindow - 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(windowcontainer WIN32 MACOSX_BUNDLE + ../../gui/openglwindow/openglwindow.cpp ../../gui/openglwindow/openglwindow.h + windowcontainer.cpp +) +target_include_directories(windowcontainer PUBLIC + ../../gui/openglwindow +) +target_link_libraries(windowcontainer PUBLIC + Qt::Widgets +) + +install(TARGETS windowcontainer + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" ) |