summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Bennett <nicholas.bennett@qt.io>2024-03-01 14:34:26 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-03-06 10:10:34 +0000
commit564677e29a72fde31216c509fb89ca5e1c83fcce (patch)
treee78f32610c0dca059493783a1bbb00f602714655
parent9e33d22474febd9f705dd8fbdd3aaca72b165c39 (diff)
Update package and app name for dice example
This is to meet the requirement that the app have a different name on the app store. Task-number: QTBUG-115724 Change-Id: Ia5b657b7a9f363a5c4ca1e7c27f75daa07d5c689 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 15e216c402bacf5039b961195231fdace2d38309) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/demos/dice/CMakeLists.txt19
-rw-r--r--examples/demos/dice/android/AndroidManifest.xml2
2 files changed, 11 insertions, 10 deletions
diff --git a/examples/demos/dice/CMakeLists.txt b/examples/demos/dice/CMakeLists.txt
index 31dfc4448..b5026a667 100644
--- a/examples/demos/dice/CMakeLists.txt
+++ b/examples/demos/dice/CMakeLists.txt
@@ -2,7 +2,8 @@
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.14)
-project(dice LANGUAGES CXX)
+set(appname "qtdice")
+project(${appname} LANGUAGES CXX)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
@@ -14,16 +15,16 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick Quick3D Quick3DPhysics Multi
qt_standard_project_setup()
-qt_add_executable(dice
+qt_add_executable(${appname}
main.cpp
)
-set_target_properties(dice PROPERTIES
+set_target_properties(${appname} PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
-target_link_libraries(dice PRIVATE
+target_link_libraries(${appname} PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Quick
@@ -64,27 +65,27 @@ set(qml_resource_files
sounds/rolling.wav
)
if(ANDROID)
- set_target_properties(dice PROPERTIES
+ set_target_properties(${appname} PROPERTIES
QT_ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android"
QT_ANDROID_TARGET_SDK_VERSION "33")
endif()
if(IOS)
set(asset_catalog_path "ios/Assets.xcassets")
- target_sources(dice PRIVATE "${asset_catalog_path}")
+ target_sources(${appname} PRIVATE "${asset_catalog_path}")
set_source_files_properties(${asset_catalog_path} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
- set_target_properties(dice
+ set_target_properties(${appname}
PROPERTIES XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon)
endif()
-qt_add_resources(dice "qml"
+qt_add_resources(${appname} "qml"
PREFIX
"/"
FILES
${qml_resource_files}
)
-install(TARGETS dice
+install(TARGETS ${appname}
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/demos/dice/android/AndroidManifest.xml b/examples/demos/dice/android/AndroidManifest.xml
index 0dee780eb..5560153ff 100644
--- a/examples/demos/dice/android/AndroidManifest.xml
+++ b/examples/demos/dice/android/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.qtproject.example"
+ package="org.qtproject.qtdice"
android:installLocation="auto"
android:versionCode="-- %%INSERT_VERSION_CODE%% --"
android:versionName="-- %%INSERT_VERSION_NAME%% --">