From 301124ba3c97949a2fdf4385fa3c167b68ca1d77 Mon Sep 17 00:00:00 2001
From: Stephen Birarda <commit@birarda.com>
Date: Mon, 11 Jan 2016 11:08:24 -0800
Subject: [PATCH] fix reference to rc template and icon prefix

---
 cmake/macros/SetPackagingParameters.cmake | 4 ++--
 cmake/templates/Icon.rc.in                | 2 +-
 interface/CMakeLists.txt                  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake
index a73daa4504..194fe6b694 100644
--- a/cmake/macros/SetPackagingParameters.cmake
+++ b/cmake/macros/SetPackagingParameters.cmake
@@ -45,7 +45,7 @@ macro(SET_PACKAGING_PARAMETERS)
 
   if (WIN32)
     set(INTERFACE_EXEC_NAME "interface")
-    set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_NAME}.ico")
+    set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_PREFIX}.ico")
   endif ()
 
   if (APPLE)
@@ -56,7 +56,7 @@ macro(SET_PACKAGING_PARAMETERS)
     set(INTERFACE_INSTALL_DIR ".")
     set(INTERFACE_INSTALL_APP_PATH "${INTERFACE_BUNDLE_NAME}.app")
 
-    set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_NAME}.icns")
+    set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_PREFIX}.icns")
   else ()
     set(CONSOLE_INSTALL_DIR ".")
     set(INTERFACE_INSTALL_DIR ".")
diff --git a/cmake/templates/Icon.rc.in b/cmake/templates/Icon.rc.in
index 0a487c96ae..c7642347ac 100644
--- a/cmake/templates/Icon.rc.in
+++ b/cmake/templates/Icon.rc.in
@@ -1 +1 @@
-IDI_ICON1 ICON DISCARDABLE "@ICON_FILENAME@"
+IDI_ICON1 ICON DISCARDABLE "@CONFIGURE_ICON_FILENAME@"
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index aaf2891067..b34f0d263c 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -102,7 +102,7 @@ elseif(WIN32)
   # configure an rc file for the chosen icon
   set(CONFIGURE_ICON_FILENAME ${INTERFACE_ICON_FILENAME})
   set(CONFIGURE_ICON_RC_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Icon.rc")
-  configure_file("${CMAKE_CURRENT_SOURCE_DIR}/templates/Icon.rc.in" ${CONFIGURE_ICON_RC_OUTPUT})
+  configure_file("${HF_CMAKE_DIR}/templates/Icon.rc.in" ${CONFIGURE_ICON_RC_OUTPUT})
 
   # add an executable that also has the icon itself and the configured rc file as resources
   add_executable(${TARGET_NAME} WIN32