native: rename application
This commit is contained in:
parent
af056c0dec
commit
d01cefa4fa
2 changed files with 10 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.16)
|
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_AUTOMOC ON)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED 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)
|
find_package(Qt6 6.2 REQUIRED COMPONENTS Quick Multimedia)
|
||||||
|
|
||||||
|
|
||||||
qt_add_executable(appQt6-Quick-Example
|
qt_add_executable(alisa
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
qt_add_qml_module(appQt6-Quick-Example
|
qt_add_qml_module(alisa
|
||||||
URI Qt6-Quick-Example
|
URI Alisa
|
||||||
VERSION 1.0
|
VERSION 1.0
|
||||||
QML_FILES Main.qml
|
QML_FILES Main.qml
|
||||||
QML_FILES AudioInfoBox.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.
|
# 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
|
# If you are developing for iOS or macOS you should consider setting an
|
||||||
# explicit, fixed bundle identifier manually though.
|
# explicit, fixed bundle identifier manually though.
|
||||||
set_target_properties(appQt6-Quick-Example PROPERTIES
|
set_target_properties(alisa PROPERTIES
|
||||||
# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appQt6-Quick-Example
|
MACOSX_BUNDLE_GUI_IDENTIFIER ninja.missing.alisa
|
||||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||||
MACOSX_BUNDLE TRUE
|
MACOSX_BUNDLE TRUE
|
||||||
WIN32_EXECUTABLE TRUE
|
WIN32_EXECUTABLE TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(appQt6-Quick-Example
|
target_link_libraries(alisa
|
||||||
PRIVATE Qt6::Quick Qt6::Multimedia
|
PRIVATE Qt6::Quick Qt6::Multimedia
|
||||||
)
|
)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
install(TARGETS appQt6-Quick-Example
|
install(TARGETS alisa
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
|
|
@ -7,10 +7,10 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QGuiApplication app(argc, 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;
|
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,
|
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
|
||||||
&app, [url](QObject *obj, const QUrl &objUrl) {
|
&app, [url](QObject *obj, const QUrl &objUrl) {
|
||||||
if (!obj && url == objUrl)
|
if (!obj && url == objUrl)
|
||||||
|
|
Loading…
Reference in a new issue