Remove unused qt5_... CMake command snippets

Task-number: QTBUG-95712
Pick-to: 6.2 6.2.0
Change-Id: I92535fd96937638bb8997a63455ba5152055b72a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Craig Scott 2021-09-08 18:00:55 +10:00
parent 9ad8d2c0d4
commit 2ad35d133a

View File

@ -1,21 +1,9 @@
#! [qt5_wrap_cpp]
set(SOURCES myapp.cpp main.cpp)
qt5_wrap_cpp(SOURCES myapp.h)
add_executable(myapp ${SOURCES})
#! [qt5_wrap_cpp]
#! [qt_wrap_cpp] #! [qt_wrap_cpp]
set(SOURCES myapp.cpp main.cpp) set(SOURCES myapp.cpp main.cpp)
qt_wrap_cpp(SOURCES myapp.h) qt_wrap_cpp(SOURCES myapp.h)
add_executable(myapp ${SOURCES}) add_executable(myapp ${SOURCES})
#! [qt_wrap_cpp] #! [qt_wrap_cpp]
#! [qt5_add_resources]
set(SOURCES main.cpp)
qt5_add_resources(SOURCES example.qrc)
add_executable(myapp ${SOURCES})
#! [qt5_add_resources]
#! [qt_add_resources] #! [qt_add_resources]
set(SOURCES main.cpp) set(SOURCES main.cpp)
qt_add_resources(SOURCES example.qrc) qt_add_resources(SOURCES example.qrc)
@ -29,47 +17,21 @@ qt_add_resources(myapp "images"
FILES image1.png image2.png) FILES image1.png image2.png)
#! [qt_add_resources_target] #! [qt_add_resources_target]
#! [qt5_add_big_resources]
set(SOURCES main.cpp)
qt5_add_big_resources(SOURCES big_resource.qrc)
add_executable(myapp ${SOURCES})
#! [qt5_add_big_resources]
#! [qt_add_big_resources] #! [qt_add_big_resources]
set(SOURCES main.cpp) set(SOURCES main.cpp)
qt_add_big_resources(SOURCES big_resource.qrc) qt_add_big_resources(SOURCES big_resource.qrc)
add_executable(myapp ${SOURCES}) add_executable(myapp ${SOURCES})
#! [qt_add_big_resources] #! [qt_add_big_resources]
#! [qt5_add_binary_resources]
qt5_add_binary_resources(resources project.qrc OPTIONS -no-compress)
add_dependencies(myapp resources)
#! [qt5_add_binary_resources]
#! [qt_add_binary_resources] #! [qt_add_binary_resources]
qt_add_binary_resources(resources project.qrc OPTIONS -no-compress) qt_add_binary_resources(resources project.qrc OPTIONS -no-compress)
add_dependencies(myapp resources) add_dependencies(myapp resources)
#! [qt_add_binary_resources] #! [qt_add_binary_resources]
#! [qt5_generate_moc]
qt5_generate_moc(main.cpp main.moc TARGET myapp)
#! [qt5_generate_moc]
#! [qt_generate_moc] #! [qt_generate_moc]
qt_generate_moc(main.cpp main.moc TARGET myapp) qt_generate_moc(main.cpp main.moc TARGET myapp)
#! [qt_generate_moc] #! [qt_generate_moc]
#! [qt5_import_plugins]
add_executable(myapp main.cpp)
target_link_libraries(myapp Qt5::Gui Qt5::Sql)
qt5_import_plugins(myapp
INCLUDE Qt5::QCocoaIntegrationPlugin
EXCLUDE Qt5::QMinimalIntegrationPlugin
INCLUDE_BY_TYPE imageformats Qt5::QGifPlugin Qt5::QJpegPlugin
EXCLUDE_BY_TYPE sqldrivers
)
#! [qt5_import_plugins]
#! [qt_import_plugins] #! [qt_import_plugins]
add_executable(myapp main.cpp) add_executable(myapp main.cpp)
target_link_libraries(myapp Qt5::Gui Qt5::Sql) target_link_libraries(myapp Qt5::Gui Qt5::Sql)