From 88f4498759de2c3be53933e85ea405ee3554e8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Wed, 3 Jun 2020 10:33:28 +0200 Subject: Port QtTools examples to cmake Change-Id: I11146959edbec6b4577fdd339d0fcb807f53c95b Reviewed-by: Alexandru Croitor --- examples/CMakeLists.txt | 20 +++++++++ examples/assistant/CMakeLists.txt | 4 ++ examples/assistant/remotecontrol/CMakeLists.txt | 49 ++++++++++++++++++++ .../simpletextviewer/.prev_CMakeLists.txt | 43 ++++++++++++++++++ examples/assistant/simpletextviewer/CMakeLists.txt | 43 ++++++++++++++++++ examples/designer/CMakeLists.txt | 19 ++++++++ examples/designer/calculatorbuilder/CMakeLists.txt | 51 +++++++++++++++++++++ examples/designer/calculatorform/CMakeLists.txt | 36 +++++++++++++++ .../containerextension/.prev_CMakeLists.txt | 40 +++++++++++++++++ .../designer/containerextension/CMakeLists.txt | 39 ++++++++++++++++ .../customwidgetplugin/.prev_CMakeLists.txt | 38 ++++++++++++++++ .../designer/customwidgetplugin/CMakeLists.txt | 37 +++++++++++++++ examples/designer/designer.pro | 4 +- .../taskmenuextension/.prev_CMakeLists.txt | 40 +++++++++++++++++ examples/designer/taskmenuextension/CMakeLists.txt | 39 ++++++++++++++++ .../designer/worldtimeclockbuilder/CMakeLists.txt | 50 +++++++++++++++++++++ .../worldtimeclockplugin/.prev_CMakeLists.txt | 38 ++++++++++++++++ .../designer/worldtimeclockplugin/CMakeLists.txt | 37 +++++++++++++++ examples/help/CMakeLists.txt | 3 ++ examples/help/contextsensitivehelp/CMakeLists.txt | 39 ++++++++++++++++ examples/linguist/CMakeLists.txt | 5 +++ examples/linguist/arrowpad/CMakeLists.txt | 37 +++++++++++++++ examples/linguist/hellotr/CMakeLists.txt | 35 +++++++++++++++ examples/linguist/trollprint/CMakeLists.txt | 37 +++++++++++++++ examples/uitools/CMakeLists.txt | 4 ++ .../uitools/multipleinheritance/CMakeLists.txt | 36 +++++++++++++++ examples/uitools/textfinder/CMakeLists.txt | 52 ++++++++++++++++++++++ 27 files changed, 874 insertions(+), 1 deletion(-) create mode 100644 examples/CMakeLists.txt create mode 100644 examples/assistant/CMakeLists.txt create mode 100644 examples/assistant/remotecontrol/CMakeLists.txt create mode 100644 examples/assistant/simpletextviewer/.prev_CMakeLists.txt create mode 100644 examples/assistant/simpletextviewer/CMakeLists.txt create mode 100644 examples/designer/CMakeLists.txt create mode 100644 examples/designer/calculatorbuilder/CMakeLists.txt create mode 100644 examples/designer/calculatorform/CMakeLists.txt create mode 100644 examples/designer/containerextension/.prev_CMakeLists.txt create mode 100644 examples/designer/containerextension/CMakeLists.txt create mode 100644 examples/designer/customwidgetplugin/.prev_CMakeLists.txt create mode 100644 examples/designer/customwidgetplugin/CMakeLists.txt create mode 100644 examples/designer/taskmenuextension/.prev_CMakeLists.txt create mode 100644 examples/designer/taskmenuextension/CMakeLists.txt create mode 100644 examples/designer/worldtimeclockbuilder/CMakeLists.txt create mode 100644 examples/designer/worldtimeclockplugin/.prev_CMakeLists.txt create mode 100644 examples/designer/worldtimeclockplugin/CMakeLists.txt create mode 100644 examples/help/CMakeLists.txt create mode 100644 examples/help/contextsensitivehelp/CMakeLists.txt create mode 100644 examples/linguist/CMakeLists.txt create mode 100644 examples/linguist/arrowpad/CMakeLists.txt create mode 100644 examples/linguist/hellotr/CMakeLists.txt create mode 100644 examples/linguist/trollprint/CMakeLists.txt create mode 100644 examples/uitools/CMakeLists.txt create mode 100644 examples/uitools/multipleinheritance/CMakeLists.txt create mode 100644 examples/uitools/textfinder/CMakeLists.txt (limited to 'examples') diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 000000000..8a360b99e --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,20 @@ +# Generated from examples.pro. + +qt_examples_build_begin() + + +qt_exclude_tool_directories_from_default_target( + assistant +) + +if(TARGET Qt::Widgets) + add_subdirectory(help) + add_subdirectory(linguist) + add_subdirectory(uitools) +endif() +if(QT_FEATURE_process AND TARGET Qt::Widgets) + add_subdirectory(designer) + add_subdirectory(assistant) +endif() + +qt_examples_build_end() diff --git a/examples/assistant/CMakeLists.txt b/examples/assistant/CMakeLists.txt new file mode 100644 index 000000000..bed9e1c4f --- /dev/null +++ b/examples/assistant/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from assistant.pro. + +add_subdirectory(simpletextviewer) +add_subdirectory(remotecontrol) diff --git a/examples/assistant/remotecontrol/CMakeLists.txt b/examples/assistant/remotecontrol/CMakeLists.txt new file mode 100644 index 000000000..3e4627975 --- /dev/null +++ b/examples/assistant/remotecontrol/CMakeLists.txt @@ -0,0 +1,49 @@ +# Generated from remotecontrol.pro. + +cmake_minimum_required(VERSION 3.14) +project(remotecontrol LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/assistant/remotecontrol") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(remotecontrol + main.cpp + remotecontrol.cpp remotecontrol.h remotecontrol.ui +) +target_link_libraries(remotecontrol PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + + +# Resources: +set(remotecontrol_resource_files + "enter.png" +) + +qt6_add_resources(remotecontrol "remotecontrol" + PREFIX + "/remotecontrol" + FILES + ${remotecontrol_resource_files} +) + +install(TARGETS remotecontrol + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/assistant/simpletextviewer/.prev_CMakeLists.txt b/examples/assistant/simpletextviewer/.prev_CMakeLists.txt new file mode 100644 index 000000000..21006b745 --- /dev/null +++ b/examples/assistant/simpletextviewer/.prev_CMakeLists.txt @@ -0,0 +1,43 @@ +# Generated from simpletextviewer.pro. + +cmake_minimum_required(VERSION 3.14) +project(simpletextviewer LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/assistant/simpletextviewer") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(simpletextviewer + assistant.cpp assistant.h + findfiledialog.cpp findfiledialog.h + main.cpp + mainwindow.cpp mainwindow.h + textedit.cpp textedit.h +) +target_compile_definitions(simpletextviewer PUBLIC + SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\" +) + +target_link_libraries(simpletextviewer PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS simpletextviewer + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/assistant/simpletextviewer/CMakeLists.txt b/examples/assistant/simpletextviewer/CMakeLists.txt new file mode 100644 index 000000000..481d12a98 --- /dev/null +++ b/examples/assistant/simpletextviewer/CMakeLists.txt @@ -0,0 +1,43 @@ +# Generated from simpletextviewer.pro. + +cmake_minimum_required(VERSION 3.14) +project(simpletextviewer LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/assistant/simpletextviewer") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(simpletextviewer + assistant.cpp assistant.h + findfiledialog.cpp findfiledialog.h + main.cpp + mainwindow.cpp mainwindow.h + textedit.cpp textedit.h +) +target_compile_definitions(simpletextviewer PUBLIC + SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" # special case +) + +target_link_libraries(simpletextviewer PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS simpletextviewer + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/CMakeLists.txt b/examples/designer/CMakeLists.txt new file mode 100644 index 000000000..f5de4c52f --- /dev/null +++ b/examples/designer/CMakeLists.txt @@ -0,0 +1,19 @@ +# Generated from designer.pro. + + +qt_exclude_tool_directories_from_default_target( + containerextension + taskmenuextension +) + +add_subdirectory(calculatorform) +if(QT_BUILD_SHARED_LIBS AND NOT solaris-cc_x_) + add_subdirectory(calculatorbuilder) + add_subdirectory(worldtimeclockbuilder) +endif() +if(QT_BUILD_SHARED_LIBS) + add_subdirectory(containerextension) + add_subdirectory(customwidgetplugin) + add_subdirectory(taskmenuextension) + add_subdirectory(worldtimeclockplugin) +endif() diff --git a/examples/designer/calculatorbuilder/CMakeLists.txt b/examples/designer/calculatorbuilder/CMakeLists.txt new file mode 100644 index 000000000..a053a0745 --- /dev/null +++ b/examples/designer/calculatorbuilder/CMakeLists.txt @@ -0,0 +1,51 @@ +# Generated from calculatorbuilder.pro. + +cmake_minimum_required(VERSION 3.14) +project(calculatorbuilder LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/designer/calculatorbuilder") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS UiTools) + +add_qt_gui_executable(calculatorbuilder + calculatorform.cpp calculatorform.h + main.cpp +) +target_link_libraries(calculatorbuilder PUBLIC + Qt::Core + Qt::Gui + Qt::UiTools + Qt::Widgets +) + + +# Resources: +set(calculatorbuilder_resource_files + "calculatorform.ui" +) + +qt6_add_resources(calculatorbuilder "calculatorbuilder" + PREFIX + "/forms" + FILES + ${calculatorbuilder_resource_files} +) + +install(TARGETS calculatorbuilder + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/calculatorform/CMakeLists.txt b/examples/designer/calculatorform/CMakeLists.txt new file mode 100644 index 000000000..7ec2b3407 --- /dev/null +++ b/examples/designer/calculatorform/CMakeLists.txt @@ -0,0 +1,36 @@ +# Generated from calculatorform.pro. + +cmake_minimum_required(VERSION 3.14) +project(calculatorform LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/designer/calculatorform") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(calculatorform + calculatorform.cpp calculatorform.h calculatorform.ui + main.cpp +) +target_link_libraries(calculatorform PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS calculatorform + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/containerextension/.prev_CMakeLists.txt b/examples/designer/containerextension/.prev_CMakeLists.txt new file mode 100644 index 000000000..81f1de9eb --- /dev/null +++ b/examples/designer/containerextension/.prev_CMakeLists.txt @@ -0,0 +1,40 @@ +# Generated from containerextension.pro. + +cmake_minimum_required(VERSION 3.14) +project(containerextension LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS Designer) + +add_qt_gui_executable(containerextension + multipagewidget.cpp multipagewidget.h + multipagewidgetcontainerextension.cpp multipagewidgetcontainerextension.h + multipagewidgetextensionfactory.cpp multipagewidgetextensionfactory.h + multipagewidgetplugin.cpp multipagewidgetplugin.h +) +target_link_libraries(containerextension PUBLIC + Qt::Core + Qt::Designer + Qt::Gui + Qt::Widgets +) + +install(TARGETS containerextension + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/containerextension/CMakeLists.txt b/examples/designer/containerextension/CMakeLists.txt new file mode 100644 index 000000000..fa7080eaf --- /dev/null +++ b/examples/designer/containerextension/CMakeLists.txt @@ -0,0 +1,39 @@ +# Generated from containerextension.pro. + +cmake_minimum_required(VERSION 3.14) +project(containerextension LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "plugins/designer") # special case + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS Designer) + +# special case begin +qt_add_plugin(containerextension) +target_sources(containerextension PRIVATE + multipagewidget.cpp multipagewidget.h + multipagewidgetcontainerextension.cpp multipagewidgetcontainerextension.h + multipagewidgetextensionfactory.cpp multipagewidgetextensionfactory.h + multipagewidgetplugin.cpp multipagewidgetplugin.h +) +# special case end +target_link_libraries(containerextension PUBLIC + Qt::Core + Qt::Designer + Qt::Gui + Qt::Widgets +) + +install(TARGETS containerextension + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/customwidgetplugin/.prev_CMakeLists.txt b/examples/designer/customwidgetplugin/.prev_CMakeLists.txt new file mode 100644 index 000000000..c241f2422 --- /dev/null +++ b/examples/designer/customwidgetplugin/.prev_CMakeLists.txt @@ -0,0 +1,38 @@ +# Generated from customwidgetplugin.pro. + +cmake_minimum_required(VERSION 3.14) +project(customwidgetplugin LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS UiPlugin) + +add_qt_gui_executable(customwidgetplugin + analogclock.cpp analogclock.h + customwidgetplugin.cpp customwidgetplugin.h +) +target_link_libraries(customwidgetplugin PUBLIC + Qt::Core + Qt::Gui + Qt::UiPlugin + Qt::Widgets +) + +install(TARGETS customwidgetplugin + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/customwidgetplugin/CMakeLists.txt b/examples/designer/customwidgetplugin/CMakeLists.txt new file mode 100644 index 000000000..c9232a2c0 --- /dev/null +++ b/examples/designer/customwidgetplugin/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from customwidgetplugin.pro. + +cmake_minimum_required(VERSION 3.14) +project(customwidgetplugin LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "plugins/designer") # special case + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS UiPlugin) + +# special case begin +qt_add_plugin(customwidgetplugin) +target_sources(customwidgetplugin PRIVATE + analogclock.cpp analogclock.h + customwidgetplugin.cpp customwidgetplugin.h +) +# special case end +target_link_libraries(customwidgetplugin PUBLIC + Qt::Core + Qt::Gui + Qt::UiPlugin + Qt::Widgets +) + +install(TARGETS customwidgetplugin + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/designer.pro b/examples/designer/designer.pro index 2248d3ec1..3ffd443e1 100644 --- a/examples/designer/designer.pro +++ b/examples/designer/designer.pro @@ -1,12 +1,14 @@ TEMPLATE = subdirs SUBDIRS = calculatorform -!static:SUBDIRS += calculatorbuilder \ +!contains(CONFIG, static) { + SUBDIRS += calculatorbuilder \ containerextension \ customwidgetplugin \ taskmenuextension \ worldtimeclockbuilder \ worldtimeclockplugin +} # the sun cc compiler has a problem with the include lines for the form.prf solaris-cc*:SUBDIRS -= calculatorbuilder \ diff --git a/examples/designer/taskmenuextension/.prev_CMakeLists.txt b/examples/designer/taskmenuextension/.prev_CMakeLists.txt new file mode 100644 index 000000000..0a6900865 --- /dev/null +++ b/examples/designer/taskmenuextension/.prev_CMakeLists.txt @@ -0,0 +1,40 @@ +# Generated from taskmenuextension.pro. + +cmake_minimum_required(VERSION 3.14) +project(taskmenuextension LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS Designer) + +add_qt_gui_executable(taskmenuextension + tictactoe.cpp tictactoe.h + tictactoedialog.cpp tictactoedialog.h + tictactoeplugin.cpp tictactoeplugin.h + tictactoetaskmenu.cpp tictactoetaskmenu.h +) +target_link_libraries(taskmenuextension PUBLIC + Qt::Core + Qt::Designer + Qt::Gui + Qt::Widgets +) + +install(TARGETS taskmenuextension + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/taskmenuextension/CMakeLists.txt b/examples/designer/taskmenuextension/CMakeLists.txt new file mode 100644 index 000000000..2ed6c4feb --- /dev/null +++ b/examples/designer/taskmenuextension/CMakeLists.txt @@ -0,0 +1,39 @@ +# Generated from taskmenuextension.pro. + +cmake_minimum_required(VERSION 3.14) +project(taskmenuextension LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "plugins/designer") # special case + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS Designer) + +# special case begin +qt_add_plugin(taskmenuextension) +target_sources(taskmenuextension PRIVATE + tictactoe.cpp tictactoe.h + tictactoedialog.cpp tictactoedialog.h + tictactoeplugin.cpp tictactoeplugin.h + tictactoetaskmenu.cpp tictactoetaskmenu.h +) +# special case end +target_link_libraries(taskmenuextension PUBLIC + Qt::Core + Qt::Designer + Qt::Gui + Qt::Widgets +) + +install(TARGETS taskmenuextension + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/worldtimeclockbuilder/CMakeLists.txt b/examples/designer/worldtimeclockbuilder/CMakeLists.txt new file mode 100644 index 000000000..8c703138c --- /dev/null +++ b/examples/designer/worldtimeclockbuilder/CMakeLists.txt @@ -0,0 +1,50 @@ +# Generated from worldtimeclockbuilder.pro. + +cmake_minimum_required(VERSION 3.14) +project(worldtimeclockbuilder LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/designer/worldtimeclockbuilder") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS UiTools) + +add_qt_gui_executable(worldtimeclockbuilder + main.cpp +) +target_link_libraries(worldtimeclockbuilder PUBLIC + Qt::Core + Qt::Gui + Qt::UiTools + Qt::Widgets +) + + +# Resources: +set(worldtimeclockbuilder_resource_files + "form.ui" +) + +qt6_add_resources(worldtimeclockbuilder "worldtimeclockbuilder" + PREFIX + "/forms" + FILES + ${worldtimeclockbuilder_resource_files} +) + +install(TARGETS worldtimeclockbuilder + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/worldtimeclockplugin/.prev_CMakeLists.txt b/examples/designer/worldtimeclockplugin/.prev_CMakeLists.txt new file mode 100644 index 000000000..52eb77843 --- /dev/null +++ b/examples/designer/worldtimeclockplugin/.prev_CMakeLists.txt @@ -0,0 +1,38 @@ +# Generated from worldtimeclockplugin.pro. + +cmake_minimum_required(VERSION 3.14) +project(worldtimeclockplugin LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS UiPlugin) + +add_qt_gui_executable(worldtimeclockplugin + worldtimeclock.cpp worldtimeclock.h + worldtimeclockplugin.cpp worldtimeclockplugin.h +) +target_link_libraries(worldtimeclockplugin PUBLIC + Qt::Core + Qt::Gui + Qt::UiPlugin + Qt::Widgets +) + +install(TARGETS worldtimeclockplugin + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/designer/worldtimeclockplugin/CMakeLists.txt b/examples/designer/worldtimeclockplugin/CMakeLists.txt new file mode 100644 index 000000000..191f148b4 --- /dev/null +++ b/examples/designer/worldtimeclockplugin/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from worldtimeclockplugin.pro. + +cmake_minimum_required(VERSION 3.14) +project(worldtimeclockplugin LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "plugins/designer") # special case + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS UiPlugin) + +# special case begin +qt_add_plugin(worldtimeclockplugin) +target_sources(worldtimeclockplugin PRIVATE + worldtimeclock.cpp worldtimeclock.h + worldtimeclockplugin.cpp worldtimeclockplugin.h +) +# special case end +target_link_libraries(worldtimeclockplugin PUBLIC + Qt::Core + Qt::Gui + Qt::UiPlugin + Qt::Widgets +) + +install(TARGETS worldtimeclockplugin + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/help/CMakeLists.txt b/examples/help/CMakeLists.txt new file mode 100644 index 000000000..b61829db7 --- /dev/null +++ b/examples/help/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from help.pro. + +add_subdirectory(contextsensitivehelp) diff --git a/examples/help/contextsensitivehelp/CMakeLists.txt b/examples/help/contextsensitivehelp/CMakeLists.txt new file mode 100644 index 000000000..0bcf89871 --- /dev/null +++ b/examples/help/contextsensitivehelp/CMakeLists.txt @@ -0,0 +1,39 @@ +# Generated from contextsensitivehelp.pro. + +cmake_minimum_required(VERSION 3.14) +project(contextsensitivehelp LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/help/contextsensitivehelp") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Help) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(contextsensitivehelp + helpbrowser.cpp helpbrowser.h + main.cpp + wateringconfigdialog.cpp wateringconfigdialog.h wateringconfigdialog.ui +) +target_link_libraries(contextsensitivehelp PUBLIC + Qt::Core + Qt::Gui + Qt::Help + Qt::Widgets +) + +install(TARGETS contextsensitivehelp + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/linguist/CMakeLists.txt b/examples/linguist/CMakeLists.txt new file mode 100644 index 000000000..612ae91cc --- /dev/null +++ b/examples/linguist/CMakeLists.txt @@ -0,0 +1,5 @@ +# Generated from linguist.pro. + +add_subdirectory(arrowpad) +add_subdirectory(hellotr) +add_subdirectory(trollprint) diff --git a/examples/linguist/arrowpad/CMakeLists.txt b/examples/linguist/arrowpad/CMakeLists.txt new file mode 100644 index 000000000..4781947e2 --- /dev/null +++ b/examples/linguist/arrowpad/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from arrowpad.pro. + +cmake_minimum_required(VERSION 3.14) +project(arrowpad LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/linguist/arrowpad") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(arrowpad + arrowpad.cpp arrowpad.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(arrowpad PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS arrowpad + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/linguist/hellotr/CMakeLists.txt b/examples/linguist/hellotr/CMakeLists.txt new file mode 100644 index 000000000..2d532895f --- /dev/null +++ b/examples/linguist/hellotr/CMakeLists.txt @@ -0,0 +1,35 @@ +# Generated from hellotr.pro. + +cmake_minimum_required(VERSION 3.14) +project(hellotr LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/linguist/hellotr") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(hellotr + main.cpp +) +target_link_libraries(hellotr PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS hellotr + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/linguist/trollprint/CMakeLists.txt b/examples/linguist/trollprint/CMakeLists.txt new file mode 100644 index 000000000..6ad0d6837 --- /dev/null +++ b/examples/linguist/trollprint/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from trollprint.pro. + +cmake_minimum_required(VERSION 3.14) +project(trollprint LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/linguist/trollprint") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(trollprint + main.cpp + mainwindow.cpp mainwindow.h + printpanel.cpp printpanel.h +) +target_link_libraries(trollprint PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS trollprint + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/uitools/CMakeLists.txt b/examples/uitools/CMakeLists.txt new file mode 100644 index 000000000..a31646da0 --- /dev/null +++ b/examples/uitools/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from uitools.pro. + +add_subdirectory(multipleinheritance) +add_subdirectory(textfinder) diff --git a/examples/uitools/multipleinheritance/CMakeLists.txt b/examples/uitools/multipleinheritance/CMakeLists.txt new file mode 100644 index 000000000..45e807daa --- /dev/null +++ b/examples/uitools/multipleinheritance/CMakeLists.txt @@ -0,0 +1,36 @@ +# Generated from multipleinheritance.pro. + +cmake_minimum_required(VERSION 3.14) +project(multipleinheritance LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/uitools/multipleinheritance") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(multipleinheritance + calculatorform.cpp calculatorform.h calculatorform.ui + main.cpp +) +target_link_libraries(multipleinheritance PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS multipleinheritance + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/uitools/textfinder/CMakeLists.txt b/examples/uitools/textfinder/CMakeLists.txt new file mode 100644 index 000000000..67eb28eae --- /dev/null +++ b/examples/uitools/textfinder/CMakeLists.txt @@ -0,0 +1,52 @@ +# Generated from textfinder.pro. + +cmake_minimum_required(VERSION 3.14) +project(textfinder LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/uitools/textfinder") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS UiTools) + +add_qt_gui_executable(textfinder + main.cpp + textfinder.cpp textfinder.h +) +target_link_libraries(textfinder PUBLIC + Qt::Core + Qt::Gui + Qt::UiTools + Qt::Widgets +) + + +# Resources: +set(textfinder_resource_files + "forms/input.txt" + "forms/textfinder.ui" +) + +qt6_add_resources(textfinder "textfinder" + PREFIX + "/" + FILES + ${textfinder_resource_files} +) + +install(TARGETS textfinder + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) -- cgit v1.2.3