diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2021-04-13 18:55:01 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2021-04-27 15:53:33 +0200 |
commit | c4623d4296f0a5502cba5f2395b97bd28a83dd6f (patch) | |
tree | 0e5321aab1fe8c45110c8046e3b15db7792e134a /examples/activeqt | |
parent | bc04ce3195048a8e236aa510a7a1e6ffa4b742c5 (diff) |
Update tests and examples to use the new '_axserver_' functions
Use the new '_axserver_' function in tests and examples associated to
creating of the ActiveX sever.
Squash find_package calls.
Change-Id: Iacdba7b673ae9cfcc7d9e1ff82d0884e330166ab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/activeqt')
-rw-r--r-- | examples/activeqt/comapp/CMakeLists.txt | 14 | ||||
-rw-r--r-- | examples/activeqt/hierarchy/CMakeLists.txt | 14 | ||||
-rw-r--r-- | examples/activeqt/menus/CMakeLists.txt | 14 | ||||
-rw-r--r-- | examples/activeqt/multiple/CMakeLists.txt | 14 | ||||
-rw-r--r-- | examples/activeqt/opengl/CMakeLists.txt | 18 | ||||
-rw-r--r-- | examples/activeqt/simple/CMakeLists.txt | 15 | ||||
-rw-r--r-- | examples/activeqt/simpleqml/CMakeLists.txt | 18 | ||||
-rw-r--r-- | examples/activeqt/wrapper/CMakeLists.txt | 14 |
8 files changed, 32 insertions, 89 deletions
diff --git a/examples/activeqt/comapp/CMakeLists.txt b/examples/activeqt/comapp/CMakeLists.txt index f27518c..87f180d 100644 --- a/examples/activeqt/comapp/CMakeLists.txt +++ b/examples/activeqt/comapp/CMakeLists.txt @@ -15,20 +15,12 @@ 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) - -qt_add_executable(comapp +find_package(Qt6 COMPONENTS Core Gui AxServer Widgets) +qt6_add_axserver_executable(comapp main.cpp -) -set_target_properties(comapp PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE + comapp.rc ) target_link_libraries(comapp PUBLIC - Qt::AxServer Qt::Core Qt::Gui Qt::Widgets diff --git a/examples/activeqt/hierarchy/CMakeLists.txt b/examples/activeqt/hierarchy/CMakeLists.txt index 839fa8e..5dca02b 100644 --- a/examples/activeqt/hierarchy/CMakeLists.txt +++ b/examples/activeqt/hierarchy/CMakeLists.txt @@ -15,21 +15,15 @@ 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) +find_package(Qt6 COMPONENTS Core Gui Widgets AxServer) -qt_add_executable(hierarchyax +qt6_add_axserver_library(hierarchyax main.cpp objects.cpp objects.h -) -set_target_properties(hierarchyax PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE + hierarchy.def + hierarchy.rc ) target_link_libraries(hierarchyax PUBLIC - Qt::AxServer Qt::Core Qt::Gui Qt::Widgets diff --git a/examples/activeqt/menus/CMakeLists.txt b/examples/activeqt/menus/CMakeLists.txt index 1d2a1cf..9b092f5 100644 --- a/examples/activeqt/menus/CMakeLists.txt +++ b/examples/activeqt/menus/CMakeLists.txt @@ -15,21 +15,15 @@ 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) +find_package(Qt6 COMPONENTS Core Gui Widgets AxServer) -qt_add_executable(menusax +qt6_add_axserver_executable(menusax main.cpp menus.cpp menus.h -) -set_target_properties(menusax PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE + menus.def + menus.rc ) target_link_libraries(menusax PUBLIC - Qt::AxServer Qt::Core Qt::Gui Qt::Widgets diff --git a/examples/activeqt/multiple/CMakeLists.txt b/examples/activeqt/multiple/CMakeLists.txt index 468ea99..b318d0b 100644 --- a/examples/activeqt/multiple/CMakeLists.txt +++ b/examples/activeqt/multiple/CMakeLists.txt @@ -15,22 +15,16 @@ 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) +find_package(Qt6 COMPONENTS Core Gui Widgets AxServer) -qt_add_executable(multipleax +qt6_add_axserver_library(multipleax ax1.h ax2.h main.cpp -) -set_target_properties(multipleax PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE + multipleax.def + multipleax.rc ) target_link_libraries(multipleax PUBLIC - Qt::AxServer Qt::Core Qt::Gui Qt::Widgets diff --git a/examples/activeqt/opengl/CMakeLists.txt b/examples/activeqt/opengl/CMakeLists.txt index b978cfe..1572de3 100644 --- a/examples/activeqt/opengl/CMakeLists.txt +++ b/examples/activeqt/opengl/CMakeLists.txt @@ -15,24 +15,16 @@ 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) - -qt_add_executable(openglax +find_package(Qt6 COMPONENTS Core Gui Widgets AxServer OpenGL OpenGLWidgets) + +qt6_add_axserver_executable(openglax glbox.cpp glbox.h globjwin.cpp globjwin.h main.cpp -) -set_target_properties(openglax PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE + opengl.def + opengl.rc ) target_link_libraries(openglax PUBLIC - Qt::AxServer Qt::Core Qt::Gui Qt::OpenGL diff --git a/examples/activeqt/simple/CMakeLists.txt b/examples/activeqt/simple/CMakeLists.txt index 12fd293..283edc6 100644 --- a/examples/activeqt/simple/CMakeLists.txt +++ b/examples/activeqt/simple/CMakeLists.txt @@ -15,20 +15,13 @@ 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) - -qt_add_executable(simpleax +find_package(Qt6 COMPONENTS Core Gui Widgets AxServer) +qt6_add_axserver_executable(simpleax main.cpp -) -set_target_properties(simpleax PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE + simple.def + simple.rc ) target_link_libraries(simpleax PUBLIC - Qt::AxServer Qt::Core Qt::Gui Qt::Widgets diff --git a/examples/activeqt/simpleqml/CMakeLists.txt b/examples/activeqt/simpleqml/CMakeLists.txt index dec072e..8faa39f 100644 --- a/examples/activeqt/simpleqml/CMakeLists.txt +++ b/examples/activeqt/simpleqml/CMakeLists.txt @@ -15,22 +15,13 @@ 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) - -qt_add_executable(simpleqmlax +find_package(Qt6 COMPONENTS Core Gui Widgets AxServer Quick QuickWidgets) +qt6_add_axserver_library(simpleqmlax main.cpp -) -set_target_properties(simpleqmlax PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE + simpleqml.def + simpleqml.rc ) target_link_libraries(simpleqmlax PUBLIC - Qt::AxServer Qt::Core Qt::Gui Qt::Quick @@ -38,7 +29,6 @@ target_link_libraries(simpleqmlax PUBLIC Qt::Widgets ) - # Resources: set(simpleqml_resource_files "main.qml" diff --git a/examples/activeqt/wrapper/CMakeLists.txt b/examples/activeqt/wrapper/CMakeLists.txt index 232a255..d9cbb78 100644 --- a/examples/activeqt/wrapper/CMakeLists.txt +++ b/examples/activeqt/wrapper/CMakeLists.txt @@ -15,20 +15,14 @@ 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) +find_package(Qt6 COMPONENTS Core Gui Widgets AxServer) -qt_add_executable(wrapperax +qt6_add_axserver_library(wrapperax main.cpp -) -set_target_properties(wrapperax PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE + wrapperax.def + wrapperax.rc ) target_link_libraries(wrapperax PUBLIC - Qt::AxServer Qt::Core Qt::Gui Qt::Widgets |