From b5dc020795f81e1f614f2aa8ea3ceca62a54316a Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sun, 24 Nov 2019 14:52:17 +0800 Subject: [PATCH] fix: missing app icon under windows --- CMakeLists.txt | 9 +++++++++ pineapple-pictures.rc | 1 + 2 files changed, 10 insertions(+) create mode 100644 pineapple-pictures.rc diff --git a/CMakeLists.txt b/CMakeLists.txt index 053d2a3..0450386 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,10 @@ set (PPIC_QRC_FILES resources.qrc ) +set (PPIC_RC_FILES + # yeah, it's empty. +) + set (EXE_NAME ppic) # Translation @@ -43,10 +47,15 @@ set (PPIC_CPP_FILES_FOR_I18N ${PPIC_CPP_FILES}) qt5_create_translation(PPIC_QM_FILES ${PPIC_CPP_FILES_FOR_I18N} ${PPIC_TS_FILES}) +if (WIN32) + list(APPEND PPIC_RC_FILES pineapple-pictures.rc) +endif () + add_executable (${EXE_NAME} ${PPIC_HEADER_FILES} ${PPIC_CPP_FILES} ${PPIC_QRC_FILES} + ${PPIC_RC_FILES} ${PPIC_QM_FILES} ) diff --git a/pineapple-pictures.rc b/pineapple-pictures.rc new file mode 100644 index 0000000..e7dcd50 --- /dev/null +++ b/pineapple-pictures.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico" \ No newline at end of file