diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-04-28 12:21:03 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-12 09:11:33 +0200 |
commit | 0f1ff389235018f51c3a5e287896bc4ee3e7c1e9 (patch) | |
tree | 32891bdbc417fa78f0a1761605b92c917a4eb0cb /examples | |
parent | a8284209f33eee8a5ecdbb2cce7798e689bc8b5d (diff) |
Initial port to cmake
Port the 2 main libraries, examples and tests.
Task-number: QTBUG-78167
Change-Id: I0d00c9fa352a96dcd0e1f42d52e6f15680abd9ed
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CMakeLists.txt | 7 | ||||
-rw-r--r-- | examples/activeqt/CMakeLists.txt | 17 | ||||
-rw-r--r-- | examples/activeqt/comapp/CMakeLists.txt | 37 | ||||
-rw-r--r-- | examples/activeqt/hierarchy/CMakeLists.txt | 38 | ||||
-rw-r--r-- | examples/activeqt/mediaplayer/CMakeLists.txt | 39 | ||||
-rw-r--r-- | examples/activeqt/menus/CMakeLists.txt | 38 | ||||
-rw-r--r-- | examples/activeqt/multiple/CMakeLists.txt | 39 | ||||
-rw-r--r-- | examples/activeqt/opengl/CMakeLists.txt | 43 | ||||
-rw-r--r-- | examples/activeqt/qutlook/CMakeLists.txt | 42 | ||||
-rw-r--r-- | examples/activeqt/simple/CMakeLists.txt | 37 | ||||
-rw-r--r-- | examples/activeqt/simpleqml/CMakeLists.txt | 54 | ||||
-rw-r--r-- | examples/activeqt/wrapper/CMakeLists.txt | 37 |
12 files changed, 428 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..362d2da --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,7 @@ +# Generated from examples.pro. + +qt_examples_build_begin() + +add_subdirectory(activeqt) + +qt_examples_build_end() diff --git a/examples/activeqt/CMakeLists.txt b/examples/activeqt/CMakeLists.txt new file mode 100644 index 0000000..c71db69 --- /dev/null +++ b/examples/activeqt/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from activeqt.pro. + +add_subdirectory(comapp) +add_subdirectory(hierarchy) +add_subdirectory(menus) +add_subdirectory(multiple) +add_subdirectory(simple) +add_subdirectory(wrapper) +if(MINGW OR QT_BUILD_SHARED_LIBS) + add_subdirectory(mediaplayer) +endif() +if(TARGET Qt6::OpenGLWidgets AND QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2) # special case + add_subdirectory(opengl) +endif() +if(TARGET Qt::QuickControls2) + add_subdirectory(simpleqml) +endif() diff --git a/examples/activeqt/comapp/CMakeLists.txt b/examples/activeqt/comapp/CMakeLists.txt new file mode 100644 index 0000000..d2100be --- /dev/null +++ b/examples/activeqt/comapp/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from comapp.pro. + +cmake_minimum_required(VERSION 3.14) +project(comapp 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}/activeqt/comapp") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS AxServer) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(comapp + main.cpp +) +target_link_libraries(comapp PUBLIC + Qt::AxServer + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS comapp + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/hierarchy/CMakeLists.txt b/examples/activeqt/hierarchy/CMakeLists.txt new file mode 100644 index 0000000..0d6d006 --- /dev/null +++ b/examples/activeqt/hierarchy/CMakeLists.txt @@ -0,0 +1,38 @@ +# Generated from hierarchy.pro. + +cmake_minimum_required(VERSION 3.14) +project(hierarchyax 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}/activeqt/hierarchy") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxServer) + +add_qt_gui_executable(hierarchyax + main.cpp + objects.cpp objects.h +) +target_link_libraries(hierarchyax PUBLIC + Qt::AxServer + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS hierarchyax + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/mediaplayer/CMakeLists.txt b/examples/activeqt/mediaplayer/CMakeLists.txt new file mode 100644 index 0000000..317ea40 --- /dev/null +++ b/examples/activeqt/mediaplayer/CMakeLists.txt @@ -0,0 +1,39 @@ +# Generated from mediaplayer.pro. + +cmake_minimum_required(VERSION 3.14) +project(mediaplayer 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}/activeqt/mediaplayer") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxContainer) + +add_qt_gui_executable(mediaplayer + main.cpp + mainwindow.ui + mediaaxwidget.h +) +target_link_libraries(mediaplayer PUBLIC + Qt::AxContainer + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS mediaplayer + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/menus/CMakeLists.txt b/examples/activeqt/menus/CMakeLists.txt new file mode 100644 index 0000000..1bf6a6b --- /dev/null +++ b/examples/activeqt/menus/CMakeLists.txt @@ -0,0 +1,38 @@ +# Generated from menus.pro. + +cmake_minimum_required(VERSION 3.14) +project(menusax 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}/activeqt/menus") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxServer) + +add_qt_gui_executable(menusax + main.cpp + menus.cpp menus.h +) +target_link_libraries(menusax PUBLIC + Qt::AxServer + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS menusax + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/multiple/CMakeLists.txt b/examples/activeqt/multiple/CMakeLists.txt new file mode 100644 index 0000000..ac9f8a9 --- /dev/null +++ b/examples/activeqt/multiple/CMakeLists.txt @@ -0,0 +1,39 @@ +# Generated from multiple.pro. + +cmake_minimum_required(VERSION 3.14) +project(multipleax 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}/activeqt/multiple") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxServer) + +add_qt_gui_executable(multipleax + ax1.h + ax2.h + main.cpp +) +target_link_libraries(multipleax PUBLIC + Qt::AxServer + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS multipleax + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/opengl/CMakeLists.txt b/examples/activeqt/opengl/CMakeLists.txt new file mode 100644 index 0000000..5c08b0c --- /dev/null +++ b/examples/activeqt/opengl/CMakeLists.txt @@ -0,0 +1,43 @@ +# Generated from opengl.pro. + +cmake_minimum_required(VERSION 3.14) +project(openglax 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}/activeqt/opengl") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxServer) +find_package(Qt6 COMPONENTS OpenGL) +find_package(Qt6 COMPONENTS OpenGLWidgets) + +add_qt_gui_executable(openglax + glbox.cpp glbox.h + globjwin.cpp globjwin.h + main.cpp +) +target_link_libraries(openglax PUBLIC + Qt::AxServer + Qt::Core + Qt::Gui + Qt::OpenGL + Qt::OpenGLWidgets + Qt::Widgets +) + +install(TARGETS openglax + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/qutlook/CMakeLists.txt b/examples/activeqt/qutlook/CMakeLists.txt new file mode 100644 index 0000000..3373330 --- /dev/null +++ b/examples/activeqt/qutlook/CMakeLists.txt @@ -0,0 +1,42 @@ +# Generated from qutlook.pro. + +cmake_minimum_required(VERSION 3.14) +project(qutlook 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}/activeqt/qutlook") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxContainer) + +) +target_link_libraries(qutlook PUBLIC + Qt::AxContainer + Qt::Core + Qt::Gui + Qt::Widgets +) + +if(NOT TYPELIBS_ISEMPTY) + target_sources(qutlook PUBLIC + addressview.cpp addressview.h + main.cpp + ) +endif() + +install(TARGETS qutlook + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/simple/CMakeLists.txt b/examples/activeqt/simple/CMakeLists.txt new file mode 100644 index 0000000..600defb --- /dev/null +++ b/examples/activeqt/simple/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from simple.pro. + +cmake_minimum_required(VERSION 3.14) +project(simpleax 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}/activeqt/simple") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxServer) + +add_qt_gui_executable(simpleax + main.cpp +) +target_link_libraries(simpleax PUBLIC + Qt::AxServer + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS simpleax + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/simpleqml/CMakeLists.txt b/examples/activeqt/simpleqml/CMakeLists.txt new file mode 100644 index 0000000..bc293ad --- /dev/null +++ b/examples/activeqt/simpleqml/CMakeLists.txt @@ -0,0 +1,54 @@ +# Generated from simpleqml.pro. + +cmake_minimum_required(VERSION 3.14) +project(simpleqmlax 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}/activeqt/simpleqml") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxServer) +find_package(Qt6 COMPONENTS Quick) +find_package(Qt6 COMPONENTS QuickWidgets) + +add_qt_gui_executable(simpleqmlax + main.cpp +) +target_link_libraries(simpleqmlax PUBLIC + Qt::AxServer + Qt::Core + Qt::Gui + Qt::Quick + Qt::QuickWidgets + Qt::Widgets +) + + +# Resources: +set(simpleqml_resource_files + "main.qml" +) + +qt6_add_resources(simpleqmlax "simpleqml" + PREFIX + "/" + FILES + ${simpleqml_resource_files} +) + +install(TARGETS simpleqmlax + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/activeqt/wrapper/CMakeLists.txt b/examples/activeqt/wrapper/CMakeLists.txt new file mode 100644 index 0000000..4a43092 --- /dev/null +++ b/examples/activeqt/wrapper/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from wrapper.pro. + +cmake_minimum_required(VERSION 3.14) +project(wrapperax 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}/activeqt/wrapper") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AxServer) + +add_qt_gui_executable(wrapperax + main.cpp +) +target_link_libraries(wrapperax PUBLIC + Qt::AxServer + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS wrapperax + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |