diff --git a/CMakeLists.txt b/CMakeLists.txt index 4be9781..60b81df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,7 +94,8 @@ file (GLOB PPIC_TS_FILES app/translations/*.ts) set (PPIC_CPP_FILES_FOR_I18N ${PPIC_CPP_FILES}) if (WIN32) - list(APPEND PPIC_RC_FILES assets/pineapple-pictures.rc) + configure_file(assets/pineapple-pictures.rc.in pineapple-pictures.rc @ONLY) + list(APPEND PPIC_RC_FILES ${CMAKE_CURRENT_BINARY_DIR}/pineapple-pictures.rc) endif () add_executable (${EXE_NAME} diff --git a/assets/pineapple-pictures.rc b/assets/pineapple-pictures.rc.in similarity index 73% rename from assets/pineapple-pictures.rc rename to assets/pineapple-pictures.rc.in index 13684e0..8509945 100644 --- a/assets/pineapple-pictures.rc +++ b/assets/pineapple-pictures.rc.in @@ -1,17 +1,18 @@ -IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico" -1 VERSIONINFO -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "FileDescription", "Pineapple Pictures - Image Viewer" - VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2024 Gary Wang" - VALUE "ProductName", "Pineapple Pictures" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END +IDI_ICON1 ICON DISCARDABLE "@CMAKE_CURRENT_SOURCE_DIR@/assets/icons/app-icon.ico" +1 VERSIONINFO +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "FileDescription", "Pineapple Pictures - Image Viewer" + VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2024 Gary Wang" + VALUE "ProductName", "Pineapple Pictures" + VALUE "ProductVersion", "@PROJECT_VERSION@" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END