Fix linking of examples

Provide add_qt_gui_executable() as function in our public API that takes
care of automaticWinMain linkage. We can use this in the future to
encapsulate similarplatform-specific behavior and adjustments, such as
module generation onAndroid.

In order for the examples to see the function in Qt5CoreMacros, three more
additional fixes were required:

    * Do the build_repo_end() call _before_ attempting to build the
      examples, as we need the build_repo_end() to include QtPostProcess
      and complete the creation of all the target config files.
      Otherwise the find_package() calls in the examples see something
      incomplete.

    * Add more QT_NO_CREATE_TARGET guards

    * Always call find_dependency on the dependencies, regardless of the
      target creation mode. This way a find_package(Qt5 COMPONENTS
      Widgets) will still load Qt5CoreMacros.

Change-Id: I03ce856e2f4312a050fe8043b8331cbe8a6c93e6
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Simon Hausmann 2019-06-11 15:46:31 +02:00
parent 82840d2660
commit 6732fa3a29
224 changed files with 244 additions and 231 deletions

View File

@ -52,9 +52,9 @@ if (QT_WILL_BUILD_TOOLS)
add_subdirectory(qmake)
endif()
qt_build_repo_end()
option(BUILD_EXAMPLES "Build Qt examples" ON)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
qt_build_repo_end()

View File

@ -1349,9 +1349,11 @@ function(qt_export_tools module_name)
set(tool_targets "")
foreach(tool_name ${QT_KNOWN_MODULE_${module_name}_TOOLS})
set(extra_cmake_statements "${extra_cmake_statements}
get_property(is_global TARGET ${INSTALL_CMAKE_NAMESPACE}::${tool_name} PROPERTY IMPORTED_GLOBAL)
if(NOT is_global)
set_property(TARGET ${INSTALL_CMAKE_NAMESPACE}::${tool_name} PROPERTY IMPORTED_GLOBAL TRUE)
if (NOT QT_NO_CREATE_TARGETS)
get_property(is_global TARGET ${INSTALL_CMAKE_NAMESPACE}::${tool_name} PROPERTY IMPORTED_GLOBAL)
if(NOT is_global)
set_property(TARGET ${INSTALL_CMAKE_NAMESPACE}::${tool_name} PROPERTY IMPORTED_GLOBAL TRUE)
endif()
endif()
")
list(APPEND tool_targets "${QT_CMAKE_EXPORT_NAMESPACE}::${tool_name}")

View File

@ -81,11 +81,11 @@ macro(qt_build_repo)
add_subdirectory(tests)
endif()
qt_build_repo_end()
if (BUILD_EXAMPLES AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples/CMakeLists.txt")
add_subdirectory(examples)
endif()
qt_build_repo_end()
endmacro()
macro(qt_set_up_standalone_tests_build)

View File

@ -9,12 +9,12 @@ get_filename_component(_import_prefix "${_import_prefix}" REALPATH)
@extra_cmake_code@
# Extra cmake code end
if (NOT QT_NO_CREATE_TARGETS)
# Find required dependencies, if any.
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
endif()
# Find required dependencies, if any.
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
endif()
if (NOT QT_NO_CREATE_TARGETS)
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@VersionlessTargets.cmake")
endif()

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(localfortuneclient WIN32 MACOSX_BUNDLE
add_qt_gui_executable(localfortuneclient WIN32 MACOSX_BUNDLE
client.cpp client.h
main.cpp
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(localfortuneserver WIN32 MACOSX_BUNDLE
add_qt_gui_executable(localfortuneserver WIN32 MACOSX_BUNDLE
main.cpp
server.cpp server.h
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(sharedmemory WIN32 MACOSX_BUNDLE
add_qt_gui_executable(sharedmemory WIN32 MACOSX_BUNDLE
dialog.cpp dialog.h dialog.ui
main.cpp
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(mimetypebrowser WIN32 MACOSX_BUNDLE
add_qt_gui_executable(mimetypebrowser WIN32 MACOSX_BUNDLE
main.cpp
mainwindow.cpp mainwindow.h
mimetypemodel.cpp mimetypemodel.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(mandelbrot WIN32 MACOSX_BUNDLE
add_qt_gui_executable(mandelbrot WIN32 MACOSX_BUNDLE
main.cpp
mandelbrotwidget.cpp mandelbrotwidget.h
renderthread.cpp renderthread.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(queuedcustomtype WIN32 MACOSX_BUNDLE
add_qt_gui_executable(queuedcustomtype WIN32 MACOSX_BUNDLE
block.cpp block.h
main.cpp
renderthread.cpp renderthread.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(contiguouscache WIN32 MACOSX_BUNDLE
add_qt_gui_executable(contiguouscache WIN32 MACOSX_BUNDLE
main.cpp
randomlistmodel.cpp randomlistmodel.h
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(customtype WIN32 MACOSX_BUNDLE
add_qt_gui_executable(customtype WIN32 MACOSX_BUNDLE
main.cpp
message.cpp message.h
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(customtypesending WIN32 MACOSX_BUNDLE
add_qt_gui_executable(customtypesending WIN32 MACOSX_BUNDLE
main.cpp
message.cpp message.h
window.cpp window.h

View File

@ -27,7 +27,7 @@ qt5_add_dbus_adaptor(chat_SRCS
chat_adaptor
)
# special case end
add_executable(chat WIN32 MACOSX_BUNDLE
add_qt_gui_executable(chat WIN32 MACOSX_BUNDLE
chat.cpp chat.h
chatmainwindow.ui
chatsetnickname.ui

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS DBus)
add_executable(complexpong WIN32 MACOSX_BUNDLE
add_qt_gui_executable(complexpong WIN32 MACOSX_BUNDLE
complexpong.cpp complexpong.h
)
target_link_libraries(complexpong PUBLIC

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS DBus)
add_executable(listnames WIN32 MACOSX_BUNDLE
add_qt_gui_executable(listnames WIN32 MACOSX_BUNDLE
listnames.cpp
)
target_link_libraries(listnames PUBLIC

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS DBus)
add_executable(pong WIN32 MACOSX_BUNDLE
add_qt_gui_executable(pong WIN32 MACOSX_BUNDLE
ping-common.h
pong.cpp pong.h
)

View File

@ -23,7 +23,7 @@ qt5_add_dbus_adaptor(car_SRCS
car_adaptor
)
# special case end
add_executable(car WIN32 MACOSX_BUNDLE
add_qt_gui_executable(car WIN32 MACOSX_BUNDLE
car.cpp car.h
main.cpp
${car_SRCS} # special case

View File

@ -21,7 +21,7 @@ qt5_add_dbus_interface(controller_SRCS
car_interface
)
# special case end
add_executable(controller WIN32 MACOSX_BUNDLE
add_qt_gui_executable(controller WIN32 MACOSX_BUNDLE
controller.cpp controller.h controller.ui
main.cpp
${controller_SRCS} # special case

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(digiflip WIN32 MACOSX_BUNDLE
add_qt_gui_executable(digiflip WIN32 MACOSX_BUNDLE
digiflip.cpp
)
target_link_libraries(digiflip PUBLIC

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(flickable WIN32 MACOSX_BUNDLE
add_qt_gui_executable(flickable WIN32 MACOSX_BUNDLE
flickable.cpp flickable.h
main.cpp
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(flightinfo WIN32 MACOSX_BUNDLE
add_qt_gui_executable(flightinfo WIN32 MACOSX_BUNDLE
flightinfo.cpp
form.ui
flightinfo.qrc # special case: add

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(lightmaps WIN32 MACOSX_BUNDLE
add_qt_gui_executable(lightmaps WIN32 MACOSX_BUNDLE
lightmaps.cpp lightmaps.h
main.cpp
mapzoom.cpp mapzoom.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(raycasting WIN32 MACOSX_BUNDLE
add_qt_gui_executable(raycasting WIN32 MACOSX_BUNDLE
raycasting.cpp raycasting.qrc
)
target_link_libraries(raycasting PUBLIC

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(styleexample WIN32 MACOSX_BUNDLE
add_qt_gui_executable(styleexample WIN32 MACOSX_BUNDLE
main.cpp
stylewidget.cpp stylewidget.h stylewidget.ui
styleexample.qrc # special case: add

View File

@ -13,7 +13,7 @@ set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples")
add_executable(gui_analogclock WIN32 MACOSX_BUNDLE # special case: renamed target
add_qt_gui_executable(gui_analogclock WIN32 MACOSX_BUNDLE # special case: renamed target
../rasterwindow/rasterwindow.cpp ../rasterwindow/rasterwindow.h
main.cpp
)

View File

@ -13,7 +13,7 @@ set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples")
add_executable(openglwindow WIN32 MACOSX_BUNDLE
add_qt_gui_executable(openglwindow WIN32 MACOSX_BUNDLE
main.cpp
openglwindow.cpp openglwindow.h
)

View File

@ -13,7 +13,7 @@ set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples")
add_executable(rasterwindow WIN32 MACOSX_BUNDLE
add_qt_gui_executable(rasterwindow WIN32 MACOSX_BUNDLE
main.cpp
rasterwindow.cpp rasterwindow.h
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(blockingfortuneclient WIN32 MACOSX_BUNDLE
add_qt_gui_executable(blockingfortuneclient WIN32 MACOSX_BUNDLE
blockingclient.cpp blockingclient.h
fortunethread.cpp fortunethread.h
main.cpp

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(broadcastreceiver WIN32 MACOSX_BUNDLE
add_qt_gui_executable(broadcastreceiver WIN32 MACOSX_BUNDLE
main.cpp
receiver.cpp receiver.h
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(broadcastsender WIN32 MACOSX_BUNDLE
add_qt_gui_executable(broadcastsender WIN32 MACOSX_BUNDLE
main.cpp
sender.cpp sender.h
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(fortuneclient WIN32 MACOSX_BUNDLE
add_qt_gui_executable(fortuneclient WIN32 MACOSX_BUNDLE
client.cpp client.h
main.cpp
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(fortuneserver WIN32 MACOSX_BUNDLE
add_qt_gui_executable(fortuneserver WIN32 MACOSX_BUNDLE
main.cpp
server.cpp server.h
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(googlesuggest WIN32 MACOSX_BUNDLE
add_qt_gui_executable(googlesuggest WIN32 MACOSX_BUNDLE
googlesuggest.cpp googlesuggest.h
main.cpp
searchbox.cpp searchbox.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(http WIN32 MACOSX_BUNDLE
add_qt_gui_executable(http WIN32 MACOSX_BUNDLE
authenticationdialog.ui
httpwindow.cpp httpwindow.h
main.cpp

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(loopback WIN32 MACOSX_BUNDLE
add_qt_gui_executable(loopback WIN32 MACOSX_BUNDLE
dialog.cpp dialog.h
main.cpp
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(multicastreceiver WIN32 MACOSX_BUNDLE
add_qt_gui_executable(multicastreceiver WIN32 MACOSX_BUNDLE
main.cpp
receiver.cpp receiver.h
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(multicastsender WIN32 MACOSX_BUNDLE
add_qt_gui_executable(multicastsender WIN32 MACOSX_BUNDLE
main.cpp
sender.cpp sender.h
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(multistreamclient WIN32 MACOSX_BUNDLE
add_qt_gui_executable(multistreamclient WIN32 MACOSX_BUNDLE
chatconsumer.cpp chatconsumer.h
client.cpp client.h
consumer.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(multistreamserver WIN32 MACOSX_BUNDLE
add_qt_gui_executable(multistreamserver WIN32 MACOSX_BUNDLE
chatprovider.cpp chatprovider.h
main.cpp
movieprovider.cpp movieprovider.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(network-chat WIN32 MACOSX_BUNDLE
add_qt_gui_executable(network-chat WIN32 MACOSX_BUNDLE
chatdialog.cpp chatdialog.h chatdialog.ui
client.cpp client.h
connection.cpp connection.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(securesocketclient WIN32 MACOSX_BUNDLE
add_qt_gui_executable(securesocketclient WIN32 MACOSX_BUNDLE
certificateinfo.cpp certificateinfo.h certificateinfo.ui
main.cpp
securesocketclient.qrc

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS Network)
add_executable(secureudpclient WIN32 MACOSX_BUNDLE
add_qt_gui_executable(secureudpclient WIN32 MACOSX_BUNDLE
addressdialog.cpp addressdialog.h addressdialog.ui
association.cpp association.h
main.cpp

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS Network)
add_executable(secureudpserver WIN32 MACOSX_BUNDLE
add_qt_gui_executable(secureudpserver WIN32 MACOSX_BUNDLE
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
nicselector.cpp nicselector.h nicselector.ui

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(threadedfortuneserver WIN32 MACOSX_BUNDLE
add_qt_gui_executable(threadedfortuneserver WIN32 MACOSX_BUNDLE
dialog.cpp dialog.h
fortuneserver.cpp fortuneserver.h
fortunethread.cpp fortunethread.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(torrent WIN32 MACOSX_BUNDLE
add_qt_gui_executable(torrent WIN32 MACOSX_BUNDLE
addtorrentdialog.cpp addtorrentdialog.h
bencodeparser.cpp bencodeparser.h
connectionmanager.cpp connectionmanager.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
add_executable(torrent WIN32 MACOSX_BUNDLE
add_qt_gui_executable(torrent WIN32 MACOSX_BUNDLE
addtorrentdialog.cpp addtorrentdialog.h
bencodeparser.cpp bencodeparser.h
connectionmanager.cpp connectionmanager.h

View File

@ -13,7 +13,7 @@ set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples")
add_executable(qrasterwindow WIN32 MACOSX_BUNDLE
add_qt_gui_executable(qrasterwindow WIN32 MACOSX_BUNDLE
main.cpp
)
target_link_libraries(qrasterwindow PUBLIC Qt::Gui) # special case: add

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Concurrent)
find_package(Qt5 COMPONENTS Widgets)
add_executable(imagescaling WIN32 MACOSX_BUNDLE
add_qt_gui_executable(imagescaling WIN32 MACOSX_BUNDLE
imagescaling.cpp imagescaling.h
main.cpp
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS Test)
add_executable(tutorial1 WIN32 MACOSX_BUNDLE
add_qt_gui_executable(tutorial1 WIN32 MACOSX_BUNDLE
testqstring.cpp
)
target_link_libraries(tutorial1 PUBLIC

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS Test)
add_executable(tutorial2 WIN32 MACOSX_BUNDLE
add_qt_gui_executable(tutorial2 WIN32 MACOSX_BUNDLE
testqstring.cpp
)
target_link_libraries(tutorial2 PUBLIC

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS Test)
add_executable(tutorial3 WIN32 MACOSX_BUNDLE
add_qt_gui_executable(tutorial3 WIN32 MACOSX_BUNDLE
testgui.cpp
)
target_link_libraries(tutorial3 PUBLIC

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS Test)
add_executable(tutorial4 WIN32 MACOSX_BUNDLE
add_qt_gui_executable(tutorial4 WIN32 MACOSX_BUNDLE
testgui.cpp
)
target_link_libraries(tutorial4 PUBLIC

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS Test)
add_executable(tutorial5 WIN32 MACOSX_BUNDLE
add_qt_gui_executable(tutorial5 WIN32 MACOSX_BUNDLE
benchmarking.cpp
)
target_link_libraries(tutorial5 PUBLIC

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
add_executable(books WIN32 MACOSX_BUNDLE
add_qt_gui_executable(books WIN32 MACOSX_BUNDLE
bookdelegate.cpp bookdelegate.h
books.qrc
bookwindow.cpp bookwindow.h bookwindow.ui

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
add_executable(cachedtable WIN32 MACOSX_BUNDLE
add_qt_gui_executable(cachedtable WIN32 MACOSX_BUNDLE
../connection.h
main.cpp
tableeditor.cpp tableeditor.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
add_executable(drilldown WIN32 MACOSX_BUNDLE
add_qt_gui_executable(drilldown WIN32 MACOSX_BUNDLE
../connection.h
drilldown.qrc
imageitem.cpp imageitem.h

View File

@ -15,7 +15,7 @@ find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS Xml)
add_executable(masterdetail WIN32 MACOSX_BUNDLE
add_qt_gui_executable(masterdetail WIN32 MACOSX_BUNDLE
database.h
dialog.cpp dialog.h
main.cpp

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
add_executable(querymodel WIN32 MACOSX_BUNDLE
add_qt_gui_executable(querymodel WIN32 MACOSX_BUNDLE
../connection.h
customsqlmodel.cpp customsqlmodel.h
editablesqlmodel.cpp editablesqlmodel.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
add_executable(relationaltablemodel WIN32 MACOSX_BUNDLE
add_qt_gui_executable(relationaltablemodel WIN32 MACOSX_BUNDLE
../connection.h
relationaltablemodel.cpp
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
add_executable(sqlbrowser WIN32 MACOSX_BUNDLE
add_qt_gui_executable(sqlbrowser WIN32 MACOSX_BUNDLE
browser.cpp browser.h
browserwidget.ui
connectionwidget.cpp connectionwidget.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
add_executable(sqlwidgetmapper WIN32 MACOSX_BUNDLE
add_qt_gui_executable(sqlwidgetmapper WIN32 MACOSX_BUNDLE
main.cpp
window.cpp window.h
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Sql)
find_package(Qt5 COMPONENTS Widgets)
add_executable(tablemodel WIN32 MACOSX_BUNDLE
add_qt_gui_executable(tablemodel WIN32 MACOSX_BUNDLE
../connection.h
tablemodel.cpp
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(animatedtiles WIN32 MACOSX_BUNDLE
add_qt_gui_executable(animatedtiles WIN32 MACOSX_BUNDLE
animatedtiles.qrc
main.cpp
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(easing WIN32 MACOSX_BUNDLE
add_qt_gui_executable(easing WIN32 MACOSX_BUNDLE
animation.h
easing.qrc
form.ui

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(moveblocks WIN32 MACOSX_BUNDLE
add_qt_gui_executable(moveblocks WIN32 MACOSX_BUNDLE
main.cpp
)
target_link_libraries(moveblocks PUBLIC

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(states WIN32 MACOSX_BUNDLE
add_qt_gui_executable(states WIN32 MACOSX_BUNDLE
main.cpp
states.qrc
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(stickman WIN32 MACOSX_BUNDLE
add_qt_gui_executable(stickman WIN32 MACOSX_BUNDLE
animation.cpp animation.h
graphicsview.cpp graphicsview.h
lifecycle.cpp lifecycle.h

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS OpenGL) # special case
add_executable(sub-attaq WIN32 MACOSX_BUNDLE
add_qt_gui_executable(sub-attaq WIN32 MACOSX_BUNDLE
animationmanager.cpp animationmanager.h
boat.cpp boat.h boat_p.h
bomb.cpp bomb.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(screenshot WIN32 MACOSX_BUNDLE
add_qt_gui_executable(screenshot WIN32 MACOSX_BUNDLE
main.cpp
screenshot.cpp screenshot.h
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(systray WIN32 MACOSX_BUNDLE
add_qt_gui_executable(systray WIN32 MACOSX_BUNDLE
main.cpp
systray.qrc
window.cpp window.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(classwizard WIN32 MACOSX_BUNDLE
add_qt_gui_executable(classwizard WIN32 MACOSX_BUNDLE
classwizard.cpp classwizard.h classwizard.qrc
main.cpp
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(extension WIN32 MACOSX_BUNDLE
add_qt_gui_executable(extension WIN32 MACOSX_BUNDLE
finddialog.cpp finddialog.h
main.cpp
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(findfiles WIN32 MACOSX_BUNDLE
add_qt_gui_executable(findfiles WIN32 MACOSX_BUNDLE
main.cpp
window.cpp window.h
)

View File

@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS PrintSupport)
add_executable(licensewizard WIN32 MACOSX_BUNDLE
add_qt_gui_executable(licensewizard WIN32 MACOSX_BUNDLE
licensewizard.cpp licensewizard.h licensewizard.qrc
main.cpp
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(standarddialogs WIN32 MACOSX_BUNDLE
add_qt_gui_executable(standarddialogs WIN32 MACOSX_BUNDLE
dialog.cpp dialog.h
main.cpp
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(tabdialog WIN32 MACOSX_BUNDLE
add_qt_gui_executable(tabdialog WIN32 MACOSX_BUNDLE
main.cpp
tabdialog.cpp tabdialog.h
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(trivialwizard WIN32 MACOSX_BUNDLE
add_qt_gui_executable(trivialwizard WIN32 MACOSX_BUNDLE
trivialwizard.cpp
)
target_link_libraries(trivialwizard PUBLIC

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(draggableicons WIN32 MACOSX_BUNDLE
add_qt_gui_executable(draggableicons WIN32 MACOSX_BUNDLE
draggableicons.qrc
dragwidget.cpp dragwidget.h
main.cpp

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(draggabletext WIN32 MACOSX_BUNDLE
add_qt_gui_executable(draggabletext WIN32 MACOSX_BUNDLE
draggabletext.qrc
dragwidget.cpp dragwidget.h
main.cpp

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(dropsite WIN32 MACOSX_BUNDLE
add_qt_gui_executable(dropsite WIN32 MACOSX_BUNDLE
droparea.cpp droparea.h
dropsitewindow.cpp dropsitewindow.h
main.cpp

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(fridgemagnets WIN32 MACOSX_BUNDLE
add_qt_gui_executable(fridgemagnets WIN32 MACOSX_BUNDLE
draglabel.cpp draglabel.h
dragwidget.cpp dragwidget.h
fridgemagnets.qrc

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(draganddrop_puzzle WIN32 MACOSX_BUNDLE # special case: renamed puzzle
add_qt_gui_executable(draganddrop_puzzle WIN32 MACOSX_BUNDLE # special case: renamed puzzle
main.cpp
mainwindow.cpp mainwindow.h
pieceslist.cpp pieceslist.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(blurpicker WIN32 MACOSX_BUNDLE
add_qt_gui_executable(blurpicker WIN32 MACOSX_BUNDLE
blureffect.cpp blureffect.h
blurpicker.cpp blurpicker.h blurpicker.qrc
main.cpp

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(fademessage WIN32 MACOSX_BUNDLE
add_qt_gui_executable(fademessage WIN32 MACOSX_BUNDLE
fademessage.cpp fademessage.h fademessage.qrc
main.cpp
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(imagegestures WIN32 MACOSX_BUNDLE
add_qt_gui_executable(imagegestures WIN32 MACOSX_BUNDLE
imagewidget.cpp imagewidget.h
main.cpp
mainwidget.cpp mainwidget.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(anchorlayout WIN32 MACOSX_BUNDLE
add_qt_gui_executable(anchorlayout WIN32 MACOSX_BUNDLE
main.cpp
)
target_link_libraries(anchorlayout PUBLIC

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(basicgraphicslayouts WIN32 MACOSX_BUNDLE
add_qt_gui_executable(basicgraphicslayouts WIN32 MACOSX_BUNDLE
basicgraphicslayouts.qrc
layoutitem.cpp layoutitem.h
main.cpp

View File

@ -15,7 +15,7 @@ find_package(Qt5 COMPONENTS OpenGL)
find_package(Qt5 COMPONENTS Widgets)
add_executable(boxes WIN32 MACOSX_BUNDLE
add_qt_gui_executable(boxes WIN32 MACOSX_BUNDLE
3rdparty/fbm.c 3rdparty/fbm.h
boxes.qrc
glbuffers.cpp glbuffers.h

View File

@ -15,7 +15,7 @@ find_package(Qt5 COMPONENTS Widgets)
find_package(Qt5 COMPONENTS OpenGL) # special case
find_package(Qt5 COMPONENTS PrintSupport) # special case
add_executable(chip WIN32 MACOSX_BUNDLE
add_qt_gui_executable(chip WIN32 MACOSX_BUNDLE
chip.cpp chip.h
images.qrc
main.cpp

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(collidingmice WIN32 MACOSX_BUNDLE
add_qt_gui_executable(collidingmice WIN32 MACOSX_BUNDLE
main.cpp
mice.qrc
mouse.cpp mouse.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(diagramscene WIN32 MACOSX_BUNDLE
add_qt_gui_executable(diagramscene WIN32 MACOSX_BUNDLE
arrow.cpp arrow.h
diagramitem.cpp diagramitem.h
diagramscene.cpp diagramscene.h diagramscene.qrc

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(dragdroprobot WIN32 MACOSX_BUNDLE
add_qt_gui_executable(dragdroprobot WIN32 MACOSX_BUNDLE
coloritem.cpp coloritem.h
main.cpp
robot.cpp robot.h robot.qrc

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(elasticnodes WIN32 MACOSX_BUNDLE
add_qt_gui_executable(elasticnodes WIN32 MACOSX_BUNDLE
edge.cpp edge.h
graphwidget.cpp graphwidget.h
main.cpp

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(embeddeddialogs WIN32 MACOSX_BUNDLE
add_qt_gui_executable(embeddeddialogs WIN32 MACOSX_BUNDLE
customproxy.cpp customproxy.h
embeddeddialog.cpp embeddeddialog.h embeddeddialog.ui
embeddeddialogs.qrc

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(graphicsview_flowlayout WIN32 MACOSX_BUNDLE # special case: renamed flowlayout
add_qt_gui_executable(graphicsview_flowlayout WIN32 MACOSX_BUNDLE # special case: renamed flowlayout
flowlayout.cpp flowlayout.h
main.cpp
window.cpp window.h

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(simpleanchorlayout WIN32 MACOSX_BUNDLE
add_qt_gui_executable(simpleanchorlayout WIN32 MACOSX_BUNDLE
main.cpp
)
target_link_libraries(simpleanchorlayout PUBLIC

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(weatheranchorlayout WIN32 MACOSX_BUNDLE
add_qt_gui_executable(weatheranchorlayout WIN32 MACOSX_BUNDLE
main.cpp
weatheranchorlayout.qrc
)

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(addressbook WIN32 MACOSX_BUNDLE
add_qt_gui_executable(addressbook WIN32 MACOSX_BUNDLE
adddialog.cpp adddialog.h
addresswidget.cpp addresswidget.h
main.cpp

View File

@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
add_executable(basicsortfiltermodel WIN32 MACOSX_BUNDLE
add_qt_gui_executable(basicsortfiltermodel WIN32 MACOSX_BUNDLE
main.cpp
window.cpp window.h
)

Some files were not shown because too many files have changed in this diff Show More