set(CPACK_WIX_UPGRADE_GUID "{{PROJECT.WIX.UPGRADE_GUID}}")
set(CPACK_WIX_PRODUCT_ICON "${PROJECT_SOURCE_DIR}/data/assets/appicon.ico")
set(CPACK_WIX_UI_BANNER "${PROJECT_SOURCE_DIR}/data/assets/wix_banner.bmp")
set(CPACK_WIX_UI_DIALOG "${PROJECT_SOURCE_DIR}/data/assets/wix_dialog.bmp")
set(CPACK_WIX_ROOT_FEATURE_TITLE "{{PROJECT.NAME}} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/packages/_CPack_Packages/patches.wix")
set(PROJECT_WIX_BIN_DIR "CM_DP_bin")
set(PROJECT_WIX_BIN_DIR_COMP "CM_CP_bin.${CMAKE_PROJECT_NAME}.exe")
set(WIX_PATH_ID "{{NAME_PREFIX}}_PATH")
set(CPACK_WIX_VERSION 4)

string(REPLACE "/" "\\" PROJECT_REGISTRY_KEY ${CPACK_PACKAGE_INSTALL_REGISTRY_KEY})
configure_file(${CMAKE_CURRENT_LIST_DIR}/wix/patches.in.wix ${CMAKE_CURRENT_BINARY_DIR}/packages/_CPack_Packages/patches.wix @ONLY)
