fix icon on linux
This commit is contained in:
1 parent
85dc558793
commit
353c82f6d6
2 files changed
+15
-3
No files matched your search
+13
-2
@@ -5,6 +5,8 @@ set(CMAKE_CXX_STANDARD 17)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# Qt6 components
|
# Qt6 components
|
||||||
find_package(Qt6 REQUIRED COMPONENTS
|
find_package(Qt6 REQUIRED COMPONENTS
|
||||||
Core
|
Core
|
||||||
@@ -40,9 +42,9 @@ set(SOURCES
|
|||||||
src/backend/formats/TxtReader.cpp
|
src/backend/formats/TxtReader.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
list(APPEND SOURCES src/asteria.rc)
|
list(APPEND SOURCES src/asteria.rc)
|
||||||
endif()
|
|
||||||
|
|
||||||
# Executable
|
# Executable
|
||||||
qt_add_executable(asteria-qt ${SOURCES})
|
qt_add_executable(asteria-qt ${SOURCES})
|
||||||
@@ -120,6 +122,15 @@ qt_add_qml_module(asteria-qt
|
|||||||
RESOURCE_PREFIX /
|
RESOURCE_PREFIX /
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Install rules
|
||||||
|
install(TARGETS asteria-qt DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
install(FILES packaging/asteria-qt.desktop
|
||||||
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||||
|
foreach(SIZE 16 32 48 64 128 256 512)
|
||||||
|
install(FILES packaging/icons/${SIZE}x${SIZE}/asteria-qt.png
|
||||||
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/${SIZE}x${SIZE}/apps)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -13,7 +13,8 @@ int main(int argc, char *argv[])
|
|||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
app.setApplicationName(QStringLiteral("Asteria"));
|
app.setApplicationName(QStringLiteral("Asteria"));
|
||||||
app.setOrganizationName(QStringLiteral("Asteria"));
|
app.setOrganizationName(QStringLiteral("Asteria"));
|
||||||
app.setWindowIcon(QIcon(QStringLiteral(":/src/assets/asteria-qt.png")));
|
app.setDesktopFileName(QStringLiteral("asteria-qt"));
|
||||||
|
app.setWindowIcon(QIcon(QStringLiteral(":/Asteria/src/assets/asteria-qt.png")));
|
||||||
|
|
||||||
QQuickStyle::setStyle(QStringLiteral("Basic"));
|
QQuickStyle::setStyle(QStringLiteral("Basic"));
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user