native: rename application

This commit is contained in:
Johannes Jöns 2024-07-09 11:39:55 +02:00
parent af056c0dec
commit d01cefa4fa
2 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(Qt6-Quick-Example VERSION 0.1 LANGUAGES CXX)
project(Alisa VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@ -8,12 +8,12 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.2 REQUIRED COMPONENTS Quick Multimedia)
qt_add_executable(appQt6-Quick-Example
qt_add_executable(alisa
main.cpp
)
qt_add_qml_module(appQt6-Quick-Example
URI Qt6-Quick-Example
qt_add_qml_module(alisa
URI Alisa
VERSION 1.0
QML_FILES Main.qml
QML_FILES AudioInfoBox.qml
@ -38,20 +38,20 @@ qt_add_qml_module(appQt6-Quick-Example
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
set_target_properties(appQt6-Quick-Example PROPERTIES
# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appQt6-Quick-Example
set_target_properties(alisa PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER ninja.missing.alisa
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
target_link_libraries(appQt6-Quick-Example
target_link_libraries(alisa
PRIVATE Qt6::Quick Qt6::Multimedia
)
include(GNUInstallDirs)
install(TARGETS appQt6-Quick-Example
install(TARGETS alisa
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}

View file

@ -7,10 +7,10 @@ int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
app.setWindowIcon(QIcon(":/Qt6-Quick-Example/Assets/Icons/Jukebox.ico"));
app.setWindowIcon(QIcon(":/Alisa/Assets/Icons/Jukebox.ico"));
QQmlApplicationEngine engine;
const QUrl url(u"qrc:/Qt6-Quick-Example/Main.qml"_qs);
const QUrl url(u"qrc:/Alisa/Main.qml"_qs);
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)