diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt
index aea23d3c..7e93b809 100644
--- a/ScreenPlay/CMakeLists.txt
+++ b/ScreenPlay/CMakeLists.txt
@@ -61,14 +61,19 @@ set(headers app.h
qt5_add_big_resources(resources resources.qrc)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
- set(qml qml.qrc)
+ qt5_add_resources(qml qml.qrc)
else()
qtquick_compiler_add_resources(qml qml.qrc )
endif()
-
add_executable(${PROJECT_NAME} ${src} ${headers} ${resources} ${qml})
+if(WIN32)
+ # Icon
+ target_sources(${PROJECT_NAME} PRIVATE ScreenPlay.rc)
+endif()
+
+
# Disable console window on Windows
# https://stackoverflow.com/questions/8249028/how-do-i-keep-my-qt-c-program-from-opening-a-console-in-windows
set_property(TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)
diff --git a/ScreenPlay/Resources.qrc b/ScreenPlay/Resources.qrc
index 2461a0f8..d969f9a9 100644
--- a/ScreenPlay/Resources.qrc
+++ b/ScreenPlay/Resources.qrc
@@ -10,7 +10,6 @@
assets/fonts/NotoSans-Medium.ttf
assets/fonts/NotoSans-Regular.ttf
assets/fonts/NotoSans-Thin.ttf
- assets/icons/favicon.ico
assets/icons/font-awsome/close.svg
assets/icons/font-awsome/frown-o.svg
assets/icons/icon_arrow_left.svg
@@ -101,5 +100,6 @@
legal/gpl-3.0.txt
legal/lgpl-2.1.txt
assets/icons/icon_delete.svg
+ assets/icons/app.ico
diff --git a/ScreenPlay/app.cpp b/ScreenPlay/app.cpp
index 6b75ad77..a439861d 100644
--- a/ScreenPlay/app.cpp
+++ b/ScreenPlay/app.cpp
@@ -43,7 +43,7 @@ namespace ScreenPlay {
App::App()
: QObject(nullptr)
{
- QGuiApplication::setWindowIcon(QIcon(":/assets/icons/favicon.ico"));
+ QGuiApplication::setWindowIcon(QIcon(":/assets/icons/app.ico"));
QGuiApplication::setOrganizationName("ScreenPlay");
QGuiApplication::setOrganizationDomain("screen-play.app");
QGuiApplication::setApplicationName("ScreenPlay");
diff --git a/ScreenPlay/assets/icons/favicon.ico b/ScreenPlay/assets/icons/app.ico
similarity index 100%
rename from ScreenPlay/assets/icons/favicon.ico
rename to ScreenPlay/assets/icons/app.ico
diff --git a/ScreenPlay/favicon.ico b/ScreenPlay/favicon.ico
deleted file mode 100644
index de00f568..00000000
Binary files a/ScreenPlay/favicon.ico and /dev/null differ
diff --git a/ScreenPlay/main.qml b/ScreenPlay/main.qml
index ff5a01be..d430cb82 100644
--- a/ScreenPlay/main.qml
+++ b/ScreenPlay/main.qml
@@ -154,7 +154,7 @@ ApplicationWindow {
SystemTrayIcon {
id: sti
visible: true
- iconSource: "qrc:/assets/icons/favicon.ico"
+ iconSource: "qrc:/assets/icons/app.ico"
tooltip: qsTr("ScreenPlay - Double click to change you settings.")
onActivated: {
switch (reason) {