diff options
Diffstat (limited to 'examples/widgets/tools')
19 files changed, 351 insertions, 378 deletions
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}" +) |