Use qt_add_executable for photosurface example

This fails to build an apk on Android, it must use qt_add_executable
which handles some extra stuff internally.

Fixes: QTBUG-90747
Pick-to: 6.0
Change-Id: I600ae4f9fb5a4ad6bbb8d5c3a06d95314ec0552e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Assam Boudjelthia 2021-01-29 14:23:44 +02:00
parent bebce1c061
commit 563dfa0812
1 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ find_package(Qt6 COMPONENTS Quick)
if (WIN32)
#! [appicon_windows]
set(app_icon_resource_windows "${CMAKE_CURRENT_SOURCE_DIR}/resources/photosurface.rc")
add_executable(photosurface main.cpp ${app_icon_resource_windows})
qt_add_executable(photosurface main.cpp ${app_icon_resource_windows})
#! [appicon_windows]
elseif (APPLE)
#! [appicon_macOS]
@ -38,10 +38,10 @@ elseif (APPLE)
set_source_files_properties(${app_icon_macos} PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources")
add_executable(photosurface MACOSX_BUNDLE main.cpp ${app_icon_macos})
qt_add_executable(photosurface MACOSX_BUNDLE main.cpp ${app_icon_macos})
#! [appicon_macOS]
else()
add_executable(photosurface main.cpp)
qt_add_executable(photosurface main.cpp)
endif()
target_link_libraries(photosurface PUBLIC